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

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

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

面试准备

模拟考试

设为首页

收藏此页面

订阅邮箱地址

SQL Query 面试题与答案

问题 61. Explain the purpose of the SQL XML functions (XMLAGG, XMLPARSE, XMLQUERY, etc.).

XML functions in SQL are used to process XML data. XMLAGG is used to concatenate XML values, XMLPARSE is used to convert a string to XML, and XMLQUERY is used to extract data from XML.

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

问题 62. What is the purpose of the SQL PIVOT and UNPIVOT operators?

The PIVOT operator is used to rotate rows into columns, while the UNPIVOT operator is used to rotate columns into rows.

Example:

SELECT * FROM (SELECT department, salary FROM Employee) AS SourceTable PIVOT (SUM(salary) FOR department IN ([Dept1], [Dept2], [Dept3])) AS PivotTable;

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

问题 63. Write a SQL query to find the cumulative sum of a column in a result set.

SELECT column, SUM(column) OVER (ORDER BY some_order_column) AS CumulativeSum FROM table;

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

问题 64. Explain the purpose of the SQL SESSION_USER and SYSTEM_USER functions.

SESSION_USER returns the current username, and SYSTEM_USER returns the login name of the current user.

Example:

SELECT SESSION_USER, SYSTEM_USER;

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

问题 65. What is the purpose of the SQL JSON functions (JSON_VALUE, JSON_QUERY, etc.)?

JSON functions in SQL are used to process JSON data. JSON_VALUE is used to extract a scalar value, and JSON_QUERY is used to extract an object or an array.

Example:

SELECT JSON_VALUE(json_column, '$.key') AS Value FROM table;

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

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

版权所有 © 2026,WithoutBook。