Oracle Tutorials

Friday, October 24, 2008

Introduction to SQL Statements

SQL Stands for Structured Query language. SQl uses simple syntax and easy to learn and use. There are five types of SQl statements. They are
1. QUERY STATEMENTS

2. DATA MANIPULATION STATEMENTS

3. DATA DEFINITION STATEMENTS

4. TRANSACTION CONTROL STATEMENTS

5. DATA CONTROL STATEMENTS

1. Query Statements

Allow you to retreive rows stored in database tables. We write SQL queries using the SELECT
statements.
EX: SELECT * FROM EMP;
This query retreives the entire set of rows from the emp table.

2. Data Manipulation Statements
The DML operations are used for manipulating the data that is present in the database tables.
There are 3 types of DML statements.
INSERT : This statement is used for inserting the rows into the tables.
UPDATE: This statement is used for updating any information in the database tables based
on some condition.
DELETE : This statement is used to delete any row or set of rows from the database table.

3. Data Definition Language Statements
The DDL statements are used for defining the structure of the database elements like tables..
There are five types
CREATE : This statement is used to CREATE a table,view,functions,triggers ( Any database
element ). We can also create users.
ALTER : This statement is used to modify the any of the database stucture that are created.
We can alter the table size,name and add columns or datatypes of the columns using this
statement.
DROP : We can drop any of the database structures using this command. We can drop tables,
Views,Synonyms,Procedures,Functions.
RENAME : We can rename the table names using this command.
TRUNCATE : Allows to delete entire contents of the table and also performs auto commit on
that table.

4. Transaction Control Statements
COMMIT : Allows to record changes permanently.
ROLLBACK : USing this command we undo the changes made by commit statement.
SAVEPOINT : We can create savepoints at any instance so that we can rollback to the
desired point of time in the database that we have created earlier.

5. Data Control Language Statements
GRANT : Permits the database user to give permissions to other user so that the user can
acccess to the database tables and other elements.
REVOKE : To take away the privilages that is given to the user, so that the user cannot
access that database elements.

Friday, October 3, 2008

Oracle All In One

Hi
This is a new blogspot and all I want is to make beginners understand what Oracle is and what is its main aim and also to focus on which area to meet to their personel interests and a lot more as we go on developinig the Oracle guides from my own learning skills and experiences.