SQL Server Interview Questions and Answers

所在平台: Udemy

课程主页: https://www.udemy.com/course/sql-server-interview-questions-answers/

课程评论:没有评论

第一个写评论        关注课程

课程简介

本 Coursera 课程“SQL Server 面试题及答案”旨在帮助您在短时间内(两天)为 SQL Server 面试做好准备。许多 SQL Server 专业人士在日常工作中专注于备份、自定义报告等重复性任务,但在面对规范化、触发器类型等基础概念时,可能会感到生疏。本课程正是为了弥补这一差距,提供面试前必要的复习。 课程内容全面,涵盖了从基础到高级的 SQL Server 知识点,包括: **第一部分:SQL Server 基础问题** * **数据库设计:** 规范化(Normalization)的概念、实现方法、反规范化(Denormalization)、OLTP 与 OLAP 的区别、第一、二、三范式。 * **数据类型和约束:** CHAR 与 VARCHAR、NCHAR 的区别及存储大小。 * **索引:** 索引的作用、如何加速搜索、聚簇索引(Clustered Index)与非聚簇索引(Non-Clustered Index)的区别。 * **SQL 对象:** 函数(Function)与存储过程(Stored Procedure)的区别。 * **触发器:** 触发器的作用、类型,以及 AFTER 触发器与 INSTEAD OF 触发器的区别。 * **事务管理:** 标识(Identity)的作用、事务(Transactions)的概念及实现。 * **JOIN 操作:** INNER JOIN、LEFT JOIN、RIGHT JOIN、FULL OUTER JOIN、CROSS JOIN 的详解。 **第二部分:SQL Server 核心概念** * **集合操作:** UNION 的作用、UNION 与 UNION ALL 的区别,以及 UNION 操作中列数不匹配和数据类型不同的情况。 * **聚合函数与分组:** 常用的聚合函数、GROUP BY 的使用场景、GROUP BY 中 SELECT 列的限制、HAVING 子句的作用及其与 WHERE 子句的区别。 * **数据排序与去重:** 数据排序方法(ORDER BY)、默认排序方式、去除重复记录的方法。 * **数据检索:** TOP 子句的使用、NULL 值的处理。 * **字符串操作:** 通配符(Wildcards)的使用、别名(Alias)的作用。 * **条件语句:** CASE 语句的书写。 * **自引用表和自连接:** 自引用表(Self-Reference Tables)和自连接(Self Join)的概念。 * **BETWEEN 子句** 的解释。 **第三部分:子查询与关联查询** * **子查询 (SubQuery):** 子查询的概念、内部子查询返回多个结果的可能性。 * **关联查询 (Co-related Query):** 关联查询的概念。 * **JOIN 与 SubQuery 的比较:** 两者之间的区别及性能对比。 **第四部分:查找 N-th 最高薪资** * **N-th Highest Salary:** 如何在 SQL 中查找第 N 高的薪资。 **第五部分:N-th Highest Salary 的不同实现方式** * **多种方法:** 使用关联查询和 T-SQL 实现查找第 N 高薪资。 * **性能对比:** 对不同方法的性能进行比较。 **第六部分:公用表表达式 (CTE)** * **CTE 概念与用途:** CTE 的定义、使用方法、执行次数、实际应用案例。 * **CTE 的 DML 操作:** 是否可以对 CTE 执行 INSERT、UPDATE 操作,以及是否会物理更新表。 * **临时表对比:** 临时表(Temporary Tables)的概念、CTE 与临时表的区别、两者的性能对比。 **第七部分:窗口函数** * **窗口函数:** 窗口函数在 SQL 中的概念。 * **PARTITION BY:** 窗口函数中 PARTITION BY 子句的作用,以及其与 GROUP BY 的相似之处与区别。 * **RANK, DENSE_RANK, ROW_NUMBER:** Rank、Dense_Rank 和 RowNumber 的区别。 **第八部分:删除重复记录** * **查找唯一记录:** 如何查找唯一的记录。 * **删除重复记录:** 包含 ID 和不包含 ID 的重复记录删除方法,使用 CTE 删除重复记录,以及在大数据量情况下无性能影响的删除重复记录优化方法。 本课程通过提供问题、答案、演示和详细解释,帮助您系统地回顾和巩固 SQL Server 知识,迎接面试挑战。 祝您学习愉快,求职顺利!

课程评论(0条)

课程详情

If you are looking forward to crack SQL Server interviews then you are at the right course.Working in SQL Server and cracking SQL Server interviews are different ball game. Normally SQL Server professionals work on repetitive tasks like back ups , custom reporting and so on. So when they are asked simple questions like Normalization , types of triggers they FUMBLE.Its not that they do not know the answer , its just that they need a revision. That's what this course exactly does. Its prepares you for SQL Server interview in 2 days. Below are the list of questions with answers , demonstration and detailed explanation. Happy learning. Happy job hunting.Must and Basic Questions on SQL Server - Part 1Question 1 :- Explain normalization ?Question 2 :- How to implement normalization ?Question 3 :- What is denormalization ?Question 4 :- Explain OLTP vs OLAP ?Question 5 :- Explain 1st,2nd and 3rd Normal form ?Question 6 :- Primary Key vs Unique key ?Question 7 :- Differentiate between Char vs Varchar ?Question 8 :- Differentiate between Char vs NChar ? Question 9 :- Whats the size of Char vs NChar ?Question 10:- What is the use of Index ?Question 11:- How does it make search faster?Question 12:- What are the two types of Indexes ?Question 13:- Clustered vs Non-Clustered indexQuestion 14:- Function vs Stored ProceduresQuestion 15:- What are triggers and why do you need it ?Question 16:- What are types of triggers ?Question 17:- Differentiate between After trigger vs Instead Of ? Question 18:- What is need of Identity ?Question 19:- Explain transactions and how to implement it ?Question 20:- What are inner joins ?Question 21:- Explain Left join ?Question 22:- Explain Right join ?Question 23:- Explain Full outer joins ?Question 24:- Explain Cross joins ?Interview Questions around essential concepts of SQL Server - Part 2Question 25:-Why do we need UNION ?Question 26:-Differentiate between Union vs Union All ?Question 27:-can we have unequal columns in Union?Question 28:-Can column have different data types in Union ?Question 29:- Which Aggregate function have you used ?Question 30:- When to use Group by ?Question 31:- Can we select column which is not part of group by ?Question 32:- What is having clause ?Question 33:- Having clause vs Where clause Question 34:- How can we sort records ?Question 35:- Whats the default sort ?Question 36:- How can we remove duplicates ?Question 37:- Select the first top X records ?Question 38:- How to handle NULLS ?Question 39:- What is use of wild cards ?Question 40:- What is the use of Alias ?Question 41:- How to write a case statement ?Question 42:- What is self reference tables ?Question 43:- What is self join ?Question 44:- Explain the between clause ?Important questions on SubQuery and Cor-related Queries in SQL-Part 3Question 45:- Explain SubQuery?Question 46:- Can inner Subquery return multiple results?Question 47:- What is Co-related Query?Question 48:- Differentiate between Joins and SubQuery?Question 49:- Performance Joins vs SubQuery?How to Find Nth Highest Salary ? - Part 4Question 50:- Find NTH Highest Salary in SQL.Covered Questions on finding Nth highest using co-related & TSQL-Part 5Question 51:- Select the top nth highest salary using correlated Queries?Question 52:- Select top nth using using TSQLQuestion 53:- Performance comparison of all the methods.Questions around SQL Server CTE(Common Table Expressions) - Part6Question 54:- What is CTE ?Question 55:- Can we execute CTE multiple times ?Question 56:- What is use of CTE ?Question 57:- How to write a recursive CTE ?Question 58:- Can we see some real world examples of CTE ?Question 59:- Can we perform insert updates on CTE?Question 60:- Does is update the tables physically ?Question 61:- What are temporary tables?Question 62:- Temp tables vs CTEQuestion 63:- Performance CTE vs TempQuestions around Window functions, Rank, Dense_Rank and RowNumber - Part 7Question 64:- What are window functions in SQL ?Question 65:- What does partition clause in window function ?Question 66:- So is window function partition similar to group by ?Question 67:- What is difference between Rank vs Dense_Rank ?Questions around Delete Duplicate Records scenarios - Part 8Question 68:- Find records which are unique.Question 69:- Delete Duplicate Records (with Id).Question 70:- Delete Duplicate Records (without Id).Question 71:- Delete Duplicate Records (using CTE).Question 72:- Delete Millions of Duplicate Records without performance impact.

课程标签

0人关注该课程

主题相关的课程