Saturday, January 22, 2011

ORACLE Part 1

SQL STANDS FOR STRUCTURED QUERY LANGUAGE.

There are two ways to start Oracle through RUN.
Run -> sqlplus... You can do all your work through Dos prompt
Run -> sqlplusw... You can do all your work through Oracle Interface

To Describe any Table..
Desc ;

To Check the Current Date of the System.
Select sysdate from Dual;

Dual is the temporary table in the Database by which you can do all your rough working.

To check the User from which you are connecting.

Show User;
or
Select user from Dual;

For Single Line Comments, Use -- This is Single Line Comments
For Multi Line Comments, Use /* This is Multi Line Comments */

To Check how many Objects are Lies in the Schema..

Select * from Tab; -- Tables
Select * from Cat; -- Catalogue

Show Structure of the Table

Desc Emp;
Desc Dept;

No comments:

Post a Comment