Wednesday, April 3, 2019


SQL Fundamental: -
Q) What is SQL ?
Ans – Structured Query Language (SQL) is the language by which we can create, alter, drop, insert, delete, update operations etc on database objects.

Q) How many SQL Statements are there and what are they ?
Ans –
There are 5 SQL Statements. Such as –
1. DDL (Data Definition Language)
2. DML (Data Manipulation Language)
3. DCL (Data Control Language)
4. TCL (Transaction Control Language)
5. DRL (Data Retrieval Language) or DQL (Data Query Language)

Q) What are DDL Commands ?
Ans –
Below are the DDL Commands. Such as –
1. Create – To help in creating database objects like table, view, synonyms etc.
2. Alter – To help in change the structure or definitions of database object.
3. Drop – To help in deleting the database object.
4. Truncate – To help in deleteing all records present in the table
5. Rename – To help in renaming the database table.

Q) What are DML Commands ?
Ans – Below are the DML Commands. Such as –
1. insert – insert one record or multiple records into database table.
2. update – update a single record or multiple records in database table.
3. delete – delete a single record or multiple records in database table.

Q) What are DCL Commands ?
Ans – Below are the DCL Commands. Such as –
1. grant – To give permission of operations on a table to single user or multiple users.
2. revoke – To take back permission of operations on a table from single user or multiple users.

Q) What are TCL Commands ?
Ans – Below are the TCL Commands. Such as –
1. commit – To save all transactions on a table.
2. rollback – To cancel the transactions till the last commit statement
3. savepoint – To save part of the transaction

Q) What are DRL Commands ?
Ans – Below is the only DRL Command. Such as –
1. select – To retrieve the data from the database.

Q) How you will see own user name ?
Ans – SQL> show user

No comments:

Post a Comment

Interview Questions: - (UNIX - 0) UNIX: -   Q) How to get inode number of a file/directory? Ans – $ ls –i <File/Directory_Name...