30 Basic to Intermediate SQL Interview Questions & Practice Tests
Автор: Excel to AI Interview Questions & Practice Tests
Загружено: 2026-01-22
Просмотров: 3
Описание:
Excel to AI — Interview Mastery for the Data‑Driven Future
Welcome to your one‑stop channel for Excel, SQL, Python, Machine Learning, and AI interview preparation. Whether you’re a fresher, making a career change, or preparing for technical rounds, we’ve got you covered. 🚀
In "30 Basic to Intermediate SQL Interview Questions & Practice Tests" video:
👉 Most competitive questions asked in the interview
👉 You can check your score at the end of the video
👉 Frequently asked SQL Questions as a practice set
Here are the Questions answers with their explanations:
Q1. Which SQL clause is executed first in a SELECT query?
✅ Answer: D) FROM
👉 The FROM clause identifies the source tables before filtering or selecting.
Q2. What will COUNT(column_name) return?
✅ Answer: B) Total non-NULL values
👉 COUNT(column_name) ignores NULLs and counts only valid entries.
Q3. Which JOIN returns records that have matching values in both tables?
✅ Answer: D) INNER JOIN
👉 INNER JOIN keeps only rows with matching keys in both tables.
Q4. Which keyword is used to remove duplicate records?
✅ Answer: B) DISTINCT
👉 DISTINCT ensures unique results by eliminating duplicates.
Q5. Which constraint ensures uniqueness but allows NULL?
✅ Answer: C) UNIQUE
👉 UNIQUE enforces non-duplicate values but permits NULL entries.
Q6. What is the result of TRUNCATE TABLE?
✅ Answer: B) Deletes rows without rollback
👉 TRUNCATE quickly clears all rows but cannot be rolled back.
Q7. Which function returns current date and time?
✅ Answer: D) All of the above
👉 NOW(), GETDATE(), and SYSDATE() all fetch system date-time.
Q8. Which subquery returns only one value?
✅ Answer: C) Scalar subquery
👉 A scalar subquery outputs a single value, not multiple rows.
Q9. What does ACID stand for?
✅ Answer: A) Atomicity, Consistency, Isolation, Durability
👉 ACID defines reliable transaction properties in databases.
Q10. Which index improves performance of SELECT queries?
✅ Answer: C) Both A & B
👉 Both clustered and non-clustered indexes speed up lookups.
Q11. Which command is used to change table structure?
✅ Answer: C) ALTER
👉 ALTER modifies schema by adding, dropping, or changing columns.
Q12. Which normal form removes transitive dependency?
✅ Answer: C) 3NF
👉 Third Normal Form eliminates indirect dependencies for cleaner design.
Q13. Which SQL statement is used to create a view?
✅ Answer: A) CREATE VIEW
👉 CREATE VIEW saves query results as a virtual table.
Q14. What is a correlated subquery?
✅ Answer: C) Query that depends on outer query
👉 A correlated subquery runs row-by-row linked to the outer query.
Q15. Which clause filters groups?
✅ Answer: C) HAVING
👉 HAVING applies conditions after grouping results.
Q16. Which command removes all rows and table structure?
✅ Answer: B) DROP
👉 DROP deletes the entire table definition and data.
Q17. What is the default JOIN in SQL?
✅ Answer: C) INNER JOIN
👉 By default, SQL uses INNER JOIN when no type is specified.
Q18. Which operator is used for pattern matching?
✅ Answer: C) LIKE
👉 LIKE matches strings using wildcards like % and _.
Q19. Which key uniquely identifies a row?
✅ Answer: C) Primary key
👉 A primary key ensures each row is uniquely identifiable.
Q20. Which function converts NULL into a value?
✅ Answer: D) All of the above
👉 IFNULL(), NVL(), and COALESCE() replace NULLs with given values.
Q21. Which SQL command is DCL?
✅ Answer: B) GRANT
👉 GRANT provides user permissions, part of Data Control Language.
Q22. Which transaction command saves changes permanently?
✅ Answer: C) COMMIT
👉 COMMIT finalizes all changes in a transaction.
Q23. What is a composite key?
✅ Answer: B) Combination of columns as primary key
👉 Composite keys use multiple columns together for uniqueness.
Q24. Which SQL command is used to remove a column?
✅ Answer: C) ALTER
👉 ALTER TABLE DROP COLUMN removes a column from a table.
Q25. Which JOIN returns all records when there is a match in either table?
✅ Answer: D) FULL JOIN
👉 FULL JOIN combines results from both tables, including unmatched rows.
Q26. Which constraint checks condition?
✅ Answer: B) CHECK
👉 CHECK enforces rules on column values.
Q27. Which clause sorts the result?
✅ Answer: B) ORDER BY
👉 ORDER BY arranges query results in ascending or descending order.
Q28. Which SQL object stores query result?
✅ Answer: B) View
👉 A view is a saved query result acting like a virtual table.
Q29. Which statement is true about DELETE?
✅ Answer: C) Can rollback
👉 DELETE removes rows but supports rollback within transactions.
Q30. Which keyword is used to check existence of records?
✅ Answer: B) EXISTS
👉 EXISTS tests if a subquery returns any rows.
Now Post your Scores in the comments
📌 Subscribe for weekly videos that help you transition from Excel basics to advanced AI concepts — and ace your next interview with confidence!
#excelinterview #SQLInterview #PythonInterview #MachineLearning #AIInterview #PracticeTests #CareerPrep
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: