SQL Introduction

SQL Introduction

What is SQL?

  • SQL stands for Structured Query Language. SQL is used to communicate with a database. It is the standard language for relational database management systems.
  • Some common relational database management systems that use SQL are Oracle, Sybase, Microsoft SQL Server and Access.

Some of the main purpose of using Oracle SQL:

1. SQL is used to retrieve data from the database

2. Update data on the database

Standard Commands and its use:

·       Data definition language(DDL)

·       Data manipulation language(DML)

·       Data control language(DCL)

·       Transaction control language(TCL)

Data definition language (DDL):

CREATE            –To create a database and its objects like, the create statement used to create a table, index, views, stored procedure, function, and triggers.

ALTER               – Modify or alter the structure of the existing database

DROP                 – Delete created objects from the database

TRUNCATE      – Remove all records from a table, including all spaces        allocated for the records are removed

COMMENT       – Add comments to the data dictionary

RENAME          – Rename an object

Data manipulation language (DML):

SELECT   – retrieve data from the database

INSERT    – insert data into a table

UPDATE  – updates existing data within a table

DELETE  – Delete all records from a database table

Data control language (DCL):

GRANT   – allow users access privileges to database

REVOKEwithdraw users access privileges given by using the GRANT command

Transaction control language (TCL):

COMMIT         commits a Transaction

ROLLBACK     – rollback a transaction because sometimes cause errors

SAVEPOINT     – rollback the transaction making points within groups

SET TRANSACTIONspecify characteristics for the transaction



No comments:

Post a Comment

Recent Posts

Service Support

Need our help to Learn or Post New Concepts Contact me