热门面试题与答案和在线测试
面向面试准备、在线测试、教程与实战练习的学习平台

通过聚焦学习路径、模拟测试和面试实战内容持续提升技能。

WithoutBook 将分主题面试题、在线练习测试、教程和对比指南整合到一个响应式学习空间中。

面试准备

模拟考试

设为首页

收藏此页面

订阅邮箱地址

SQL Query 面试题与答案

问题 21. Explain the difference between a primary key and a unique key.

A primary key is used to uniquely identify each record in a table and cannot contain NULL values. A unique key enforces uniqueness but can contain NULL values.

这有帮助吗? 添加评论 查看评论
 

问题 22. Write a SQL query to find the nth highest salary from an Employee table.

SELECT salary FROM Employee ORDER BY salary DESC LIMIT 1 OFFSET n-1;

这有帮助吗? 添加评论 查看评论
 

问题 23. Explain the difference between UNION and JOIN.

UNION is used to combine the results of two or more SELECT statements, while JOIN is used to retrieve data from multiple tables based on a related column between them.

这有帮助吗? 添加评论 查看评论
 

问题 24. What is a trigger in SQL?

A trigger is a set of instructions that are automatically executed (or 'triggered') in response to certain events on a particular table or view.

这有帮助吗? 添加评论 查看评论
 

问题 25. Write a SQL query to update multiple rows in a table.

UPDATE table SET column1 = value1, column2 = value2 WHERE condition;

这有帮助吗? 添加评论 查看评论
 

用户评价最有帮助的内容:

版权所有 © 2026,WithoutBook。