Название: Querying Using T-SQL 2nd Edition Автор: Michael Howell Издательство: Transference UnLimited Год: 2020 Формат: epub/pdf(conv.) Страниц: 450 Размер: 42.4 Mb Язык: English
The text uses SQL 2017 but is perfectly valid for SQL 2008R2 to SQL 2019. Each chapter includes exercises with answers based on Microsoft’s Adventure Works database used in their official course material. An appendix describes where to download and how to install MS SQL. It covers: How SQL came about and what data management issues it solves. What primary key and foreign keys are. What an object in SQL is and what naming conventions/rules you use to refer to them. How to write SQL scripts using variables, WHILE, IF, BEGIN...END How to use SQL Server Management Studio Solutions to organise your SQL scripts. How to use SELECT statement with the WHERE and ORDER BY clauses. How to use column and table aliases. How to reformat and do arithmetic with dates. How to use type conversions to format data so that it is suitable for printing or displaying. How joins are and how they work to link tables together. How to do inner joins, outer joins, self-joins, cross joins and full joins. How to group data using the GROUP BY and HAVING clauses. How to use CTE’s (Common Table Expressions) to break a complex query into manageable pieces. How to do data partitioning using the OVER and PARTITION BY clauses to let you display totals and data rows simultaneously. How to create tables including using CHECK, DEFAULT and PRIMARY KEY constraints. How to specify and use primary-key-to -foreign-key relationships to protect the integrity and consistency of your data. How to use the default, check, NULL and computed columns to aid in data correctness. Variations of how to insert, delete and update data. Various way to copy data from one table to another using SQL commands. How database transactions work. What an implicit transaction is and how it will affect your data modification queries. How to create explicit transactions to protect a user from data changes using BEGIN TRAN, COMMIT TRAN and ROLLBACK TRAN. How locks affect your and other user’s queries. How to override row locks for reporting purposes. How to write scripts that elegantly deal with errors using BEGIN TRY...END TRY and related statements. BONUS CONTENT: The basics of writing Stored procedures, quickly and easily. Almost everything you need to pass the Microsoft 70-761 or 70-461 querying is covered here. However, I recommend supplementing your knowledge with the official exam guide.