Top 50 SQL Interview Questions and answer
Sql is nothing but a Structured Query Language, it is used to perform DML tasks such as select,update,delete and insert. It is basically used to communicate with database.
2. what is DBMS
A database management system (DBMS) is a collection of programs that enables you to store, modify, and extract information from a database.
3.What is database
A structured form of data, which we can use for storing, retrieval, accessing and managing of data.
4.What is table
It is combination of rows and columns.
5.What is a join
An SQL JOIN clause is used to combine columns or rows from two or more tables,depand on a common field between two table.
6. Explain types of join
1. Inner join 2. outer join 3. left outer join 4. right outer join 5. self join 6. cross join 7. full outer join
7.What is primary key
The primary key of a relational table uniquely identifies each value in the column . We can define only one primary key in the table, Primary key doesnt allow null value.
8.What is unique key
The unique key of a relational table uniquely identifies each value in the column . We can define any number of unique key in the table, unique key allow null value.
9.What is foreign key?
Foreign key is used to create a relation between two table. We can define any number of Foreign key in the table.
10.What is a view
View is nothing but a virtual table, which contain result set of an SQL statement. View also contains row and columns just like real table. We can also perform DML operation on view.