Sunday, 6 March 2016

How to display line numbers in oracle Sql developer ?

Solution:  follow the below steps –


Step 1: Go to start then open SQL Developer.
































Step 2: In SQL Developer under  Tools then click on Preferences.





















Step 3: In Preferences dialog window, expand Code Editor and select Line Gutter.


























Step 4: In Line Gutter item, check Show Line Numbers from right side window and click Ok 
button.


Your SQL Developer interface will display the line number while writing SQL queries.
(Below screen shot for reference)

Please share your in case of any further clarification on above post.

Friday, 4 March 2016

Difference between DELETE, TRUNCATE and DROP commands ......................



DELETE

  •   DELETE is a DML command
  •   DELETE   command is use to remove rows from a table.
  •   COMMIT or ROLLBACK is necessary after performing DELETE operation commend because DELETE is a DML command.
  •   WHERE clause can be used in DELETE operation for removing some rows from a table.
  •   Only rows of table is remove not structured.

TRUNCATE

  •    TRUNCATE is a DDL command.
  •    TRUNCATE remove all rows from table,this is faster than DELETE.
  •   COMMIT or ROLLBACK is not use while performing TRUNCATE commend because  DDL command.
DROP

  •    DROP is a DDL command.
  •   DROP remove table from the database (remove data & structure of table).
  • COMMIT or ROLLBACK is not use 

Thursday, 3 March 2016

What is Substitution Variable in Oracle



Substitution variable is a user variable name preceded by ampersands (&) .


Use of Substitution Variable(&)
Example:

Create table test1 (id number, name varchar2 (50), job varchar2 (50), mobile number);

Insert into test1 values (1,'vinod','gov',9453534145);
Insert into test1 values (2,'ashu','gov',9453534148);
Insert into test1 values (3,'rahul','priv',9453534172);                    
Insert into test1 values (4,'solhu','self',9453539158);
Insert into test1 values (5,'pradep','priv',9456534148);
Insert into test1 values (6,'mishra','gov',9453538148);
Insert into test1 values (7,'pal','self', 9453536448);    

in this example enter id at run time .
if set verify off   then old & new not show 

In above example two variable is used table_name and enter_id



    

Saturday, 2 January 2016

Difference between view and materialized view.............

  VIEW :

  1. The view will not store any data.
  2. The view is mainly use for the security purpose.
  3. In view whenever the base table is dropped the view will not be accessible. 
  4. In view DML operation can perform.(on simple views)
MATERIALIZED VIEW :

  1. The materialized view will store the data.
  2. The materialized view is mainly use for the performance purpose.
  3. In materialized view whenever the base table is dropped the view will accessible.
  4. In materialized view DML operation can not perform. 












Please share your in case of any further clarification on above post.