Database Reference
In-Depth Information
What are SQL Statements/Commands?
SQL is nothing but a set of statements (commands) and are
categorized into following five groups viz., DQL: Data Query
Language, DML: Data Manipulation Language, DDL: Data
Definition Language, TCL: Transaction Control Language,
DCL: Data Control Language.
The commands falling in each of these categories are shown in
the following table.
DQL SELECT
DML DELETE, INSERT, UPDATE
DDL CREATE, DROP, TRUNCATE, ALTER
TCL COMMIT, ROLLBACK, SAVEPOINT
DCL GRANT, REVOKE
Figure 2-3: SQL Statements/Commands categorization.
Once we finish up with SQL you will say to yourself, “Oh! That
was all”. Let's look at the following example.
SELECT name, phone, city
FROM address_book;
Anyone knowing English language can easily imagine what the
output of this statement will be. It will be three fields with all
the records from address_book table. So you completed your
first SQL statement.
How to use the SELECT Statement/Command?
The SELECT statement as the name says is used to extract data
from Oracle Database. The syntax for the simplest SELECT
statement is as follows.
SELECT column_name1, column_name2, …
FROM table_name1;
Search WWH ::




Custom Search