SQL Certification - SPLessons

SQL Certification Statements

Home > Lesson > Chapter 6
SPLessons 5 Steps, 3 Clicks
5 Steps - 3 Clicks

SQL Certification Statements

Statements

shape Description

Statements in SQL database includes the basic functionality of SQL keywords. SQL statements are divided into few types. The following are lists of SQL statements types:
Type of SQL Statements SQL Keywords
DDL Create, Alter, Drop, Truncate
DML Insert, Update, Delete
DCL Grant, Revoke
TCL Commit, Rollback, Save points

Data Definition Language

shape Description

Data Definition Language(DDL) is utilized to characterize information in database server. DDL statements explains, how the pattern of data should be there in the database schema table and includes the following commands.

Create Table

Create table articulation is utilized to make a table in the database server. And each table in the database should contain unique name and these tables are organised into rows and columns, where appropriate data or values should be inserted. And the column parameters specifies the name of the columns of the table and the datatypes parameters specifies the type of data that the column is holding that may vary from varchar, decimal, date and integers.

Alter Table

SQL Alter Table statement is used to add, modify, or delete a columns from the existing table. Alter Table command performs adding of column or modifying column size and is divided into two types.

Drop Table

Drop Table command can be performed on existing database. Indexes, tables, and databases can easily be erased/evacuated with the DROP statement. The following are the actions performed by drop command.

SQL Truncate Table

SQL is a non-procedural dialect. Client can compose SQL script to execute and SQL compiler consequently produces a method to get to database and convey the fancied output. SQL is a database coding, planned for the recuperation and organisation of data in social database. SQL Truncate command is utilized to erase all rows from the current table in the database."SQL Truncate Table" command shows how to truncate the rows in a table.

Data Manipulation Language

shape Description

Data manipulation language is utilized to manage data within the table.

Insert

By using SQL Insert command new record can be inserted in the existing database table. i.e, inserting field value like emp_id, emp_name and salary can be inserted.

Update

By using SQL Update command, the column values can be updated i.e, changing the name of the employee and increasing/decreasing the salary. And the column parameters specifies the name of the columns of the table and the datatypes parameters specifies the type of data that the column is holding that may varies from varchar, decimal, date and integers.

Delete

By using SQL DELETE command rows can be deleted from an existing table taking into account the given condition.

Data Control Language

shape Description

To perform DML operations on a table permissions are required which are called "Privileges". And these privileges can be easily accessed by using Data Control Language.

Grant

GRANT is used to grant permissions to the clients. In the SQL database it offers both the server and client a great amount of control privileges. At the server side of the procedure, it incorporates the possibility for the server to control certain customer benefits over the SQL database away and reducing their connection permissions from the database or giving limited authorizations for a particular table.

Revoke

The revoke command will cancel all the permissions from the user.

Transaction Control Language

shape Description

A Transaction is a collection of SQL statement between specific client and server. And these transactions can be efficiently handled by using transaction control language.

Commit

If commit command is executed then all the work done in the last transaction will be made permanent in the server.

Roll-back

If roll-back command is performed then oracle server will cancel all the modifications of SQL statements in the last transactions.

Save points

If save points commands are performed, roll back operation will be performed on a part of transaction. The save points commands sets a name transaction save-point by the  name of identifier. On the off chance present transaction has a save point with the similar name, then the old save point is deleted and a new one is assigned.

Summary

shape Key Points

  • Statements - Describe the SQL standard keyword in the database.
  • Data Definition Language - Used to define data in database server.
  • Data Manipulation Language - Used to manipulate data in the database server.
  • Data Control Language - Perform operations on a table by giving permissions.
  • Transaction Control Language - Will handle a transaction by using specific client and server.