Sunday, September 25, 2011

Oracle Query


Introduction to Query Concepts

  • Queries enable you to retrieve information or objects from the database, modify or delete those objects, and create new objects on the database.

 about SQL

In Oracle, SQL is divided into two basic groups: 
  • data definition language (DDL) or data manipulation language (DML).   
  • DDL is used to define objects within the database just as creating tables or indexes. 
  •  DML is used to insert, update and delete data in the database.  Finally, there is data retrieval, which is the SELECT statement. 
Example of select statement:
The SELECT statement is used to retrieve data from the database.  The format is:
select columns from tables;
Let’s get a list of author last names. 
SQL> SELECT author_last_name FROM author;
 
AUTHOR_LAST_NAME
----------------------------------------
jones
hester
weaton
jeckle
withers
petty
clark
mee
shagger
smith
 
10 rows selected.