Thursday, December 20, 2012

SQL Interview Question for a Fresher


1.Explain different type of Statements in Sql?  (DDL,DML,DQL)

2.What are DDL,DML Statements?

3.What is the difference between truncate and delete commands?
Sol: Truncate completely delete the table contents ,Truncate belongs to DDL
delete can completely delete the table contents as well as deletes the particular rows(using where clause),delete belongs to DML

3.What are SQL Joins? Explain SQL Joins? (Most important one)

4.Scenario based questions using Joins.Suppose there are two tables exists in database.Then query will be asked to get common information from both tables etc.

5.What are Views in SQl?

6.What are Triggers in SQL ?