Thursday, 4 May 2017

What Are The Languages Available in Oracle SQL.


v  DATA DEFINITION LANGUAGE:(DDL)
                Set up, changes and removes data structure from tables.
DDL STATEMENTS:
1.       Create
2.       Alter
3.       Drop
4.       Rename
5.       Truncate
6.       Comment
v  DATA MANIPULATION LANGUAGE: (DML)
                It retrieves data from the database, enters new rows changes existing rows and removes unwanted rows from the tables in the database.
DML STATEMENTS:
1.       INSERT
2.       UPDATE
3.       DELETE
4.       MERGE
v  DATA QUERY LANGUAGE: (DQL)
SELECT:  The SQL SELECT statement returns a result set of records from one or more tables.
A SELECT statement retrieves zero or more rows from one or more database tables or database views. In most applications, SELECT is the most commonly used data query language (DQL) command. As SQL is a declarative programming language, SELECT queries specify a result set but do not specify how to calculate it. The database translates the query into a "query plan" which may vary between executions, database versions, and database software. This functionality is called the "query optimizer" as it is responsible for finding the best possible execution plan for the query, within applicable constraints.
The SELECT statement has many optional clauses:
1.       WHERE specifies which rows to retrieve.
2.       GROUP BY groups rows sharing a property so that an aggregate function can be applied to each group.
3.       HAVING selects among the groups defined by the GROUP BY clause.
4.       ORDER BY specifies an order in which to return the rows.
5.       AS provides an alias which can be used to temporarily rename tables or columns.
v  DATA CONTROL LANGUAGE: (DCL)
                It Provides or removes access rights to the oracle database and the structure within it.
DCL STATEMENTS:
1.       GRANT
2.       REVOKE
v  TRANSACTION CONTROL LANGUAGE:(TCL)
This will be used to save the work.
TCL STATEMENTS:
1.       COMMIT
2.       ROLLBACK
3.       SAVEPOINT

No comments:

Post a Comment