SQL Interview Questions with Answers for Freshers - 1
Question: 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.
Question: 2
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.
Question: 3
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.
Question: 4
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.
Question: 5
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
DC Generator Questions and Answers Pdf More
Electromagnetic Induction Quiz Questions and Answers More
Basic Electronics Quiz Questions with Answers Pdf More
Wireless Communication MCQ Questions with Answers More
Digital Communication Quiz Questions and Answers Pdf More
7000+ Independence Day Quiz Questions and Answers 2023-2024 Pdf More
IT Companies Interview Questions and Answers 2020-2021 More
Cell Cycle NEET Questions More
100+ Reconstruction of Sentence Questions for CDS/NDA Exam More
Manufacturing Industries MCQs Questions for Class 10 Pdf More