SQL Interview Questions with Answers for Freshers - 1
What is the difference between Delete and Truncate command in SQL?
Delete command and truncate command both will delete the data, however the truncate command can not be rolled back as delete can be.
The delete command can be used for selected records using the where clause but with the truncate command we have to loose data. DELETE statement is a logged operation and hence takes more time then truncate.
What is normalization?
- Well a relational database is basically composed of tables that contain related data.
- So the Process of organizing this data into tables is actually referred to as normalization.
What is the difference between a HAVING CLAUSE and a WHERE CLAUSE?
Having Clause is basically used only with the GROUP BY function in a query.
WHERE Clause is applied to each row before they are part of the GROUP BY function in a query.
What are the advantages and disadvantages of normalization?
There are several advantages of normalization as under:
Faster sorting and index creation.
A larger number of clustered indexes.
Narrower and more compact indexes.
Fewer indexes per table, which improves the performance of INSERT, UPDATE, and DELETE statements
Fewer null values and less opportunity for inconsistency, which increase database compactness.
Beside the above benefits there are few disadvantages as well:
Increased amount of Normalization increases the amount of complexity of joins between tables and that hinders the performance.
What is the use of DBCC commands?
DBCC stands for database consistency checker. We use these commands to check the consistency of the databases, i.e., maintenance, validation task and status checks.
- Top 100+ SQL Query Interview Questions and Answers
- SQL Interview Questions and Answers for Freshers
- Best 100+ SQL Interview Questions and Answers 2020-21
- SQL Interview Questions and Answers for Experienced
- Top 100+ Advanced SQL Interview Questions 2020-2021
- SQL Interview Questions with Answers for Freshers
- Complex SQL Interview Questions and Answers Pdf
7000+ TNPSC Group 1, 2, 4, VAO Indian Economy Study Materials Pdf More
7000+ Gate Computer Science Engineering Previous Year Questions More
7000+ Fill in the Blanks with Suitable Homonyms More
7000+ Fill in the Blanks with Suitable Homophones More
Power Semiconductor Device and Integrated Circuits MCQ Questions Pdf More
Top 50+ Cell Biology and Molecular Biology Questions & Answers Pdf More
TNPSC Biology Model Question Paper in Tamil and English More
Previous 10 Years Question Papers with Answers for TRB Chemistry More
TNPSC Reasoning Questions and Answers More
TRB Latest Updates, Exam Date, Age Limit, Notifications 2019 More