As its title implies, this book presents all of the SQL Server skills that application developers need on the job. As such, it’s a great book for a SQL course. It can also add real-world perspective when it’s used as a supplementary text in any database course.
The Canvas course file contains all the objectives, quizzes, assignments, and slides that you need to run an effective course. It only takes a few clicks to import it into the Canvas LMS. Then, you can customize it for your course. Learn more.
I was concerned about changing texts, but the student feedback on your SQL Server text has been amazing. I have had students buy this text who had previously not bought a text since first year."
This section presents the concepts and terms for working with any relational database. Then, it shows how to use Microsoft SQL Server and Management Studio to run SQL statements.
This section presents all the skills for retrieving data from a database and for adding, updating, and deleting that data. These skills move from the simple to the complex, and they include skills like using outer joins, summary queries, and subqueries.
This section shows how to design a database and how to implement that design by using either SQL statements or Management Studio. When your students are done, they’ll be able to design and implement their own databases.
This section presents database features like views, scripts, stored procedures, functions, triggers, cursors, and transactions. It also shows how to manage database security. These features illustrate the power of a database management system. These chapters are designed as independent modules, so you can present whichever features you want as time allows. But don’t worry that you can’t cover them all! With the foundation you’ve provided in the course, your students will continue to use the book to expand their skills as they move into the workplace.
This section shows how to get started with Microsoft’s cloud computing platform, Azure. In particular, it shows how to migrate a local SQL Server database to Azure, and how to use Azure Data Studio to work with a remote Azure SQL database.
Like all our books, this one has many features that help your students learn faster and better. Here are a couple that set this book apart.
Unlike most SQL books, this one starts by showing how to query an existing database rather than showing how to create a new database. Why?
First, it’s motivating to see results right away, and querying an existing database provides that for your students. Second, querying an existing database helps give your students insight into the decisions that have to be made when designing a database.
As a result, learning how to query first makes it easier for students to learn how to design and implement a database later. In addition, it prepares them for using more advanced database features like views and stored procedures.
This book presents hundreds of SQL statements that range from the simple to the complex. That way, your students can quickly get the idea of how a feature works from the simple examples and also see how the feature works in the real world from the complex ones.
This book is ideal as
The sequence of the chapters has been designed to work well for most SQL courses. But if this sequence doesn’t fit the requirements of your course, the modular nature of this book gives you many presentation options.
After your students complete the first two sections, you can teach any other section of the book. For example, if you want to present Azure SQL databases earlier in your course, you can skip directly to section 5.
In addition, most of the chapters in sections 3 and 4 are independent of each other, so they can be taught in any order. The main points here are that (1) you don’t need to teach the chapters in sequence and (2) you get to decide the focus of your course.
On a related note, if you want your students to use Azure Data Studio instead of SQL Server Management Studio, you can swap chapters 2 and 18. Then, your students can use Azure Data Studio for most of the book.
If you want your students to install SQL Server 2022 Express on Windows as described in appendix A, they’ll need
That’s because SQL Server 2022 doesn’t run on Windows 8 or earlier.
To work with SQL Server as shown in this book, your students can download all the software they need from Microsoft’s website for free. That includes:
Appendix A provides complete instructions for installing this software.
If you’ve been using the 2019 Edition, we think you’ll find it’s easy to revise your course for this 2022 Edition. In addition, we think you’ll find that your revised course will work better for your students.
Here’s what we changed:
"Gave your SQL Server text a strong recommendation at Microsoft. I required their MTA certification as the final exam in the SQL course in the Fall. 15 of 17 passed."
- Keith E. Kelly, Northwestern Michigan College
"I was concerned about changing texts, but the student feedback on your SQL Server text has been amazing. I have had students buy this text who had previously not bought a text since first year."
- Professor/Program Coordinator, Ontario
"By far the best introductory text I have come across for SQL Server, and I have reviewed and used many."
- Daniel A. Joseph, MIS Professor & Consultant, Rochester Institute of Technology
“Originally bought this book for my online database programming class, now I am definitely keeping it for future use.”
- Posted by a student at an online bookseller
“Love this book. It has lots of examples and it explains things very well. I use this in addition to my textbook for class.”
- Posted at an online bookseller
“This is the best book on SQL Server I have seen….A word about the format (I love it): Even numbered pages contain theoretical/descriptive expositions of various topics. On the facing odd-number pages, the book has well designed examples illustrating the material on the even pages.”
- Dr. Andrew Katz, Programmer & Instructor, New York
“This is my go-to book for teaching SQL Server to our developers who do not use SQL every single day.”
- Posted at an online bookseller
View the table of contents for this book in a PDF: Table of Contents (PDF)
Click on any chapter title to display or hide its content.
The hardware components of a client/server system
The software components of a client/server system
Other client/server system architectures
How a database table is organized
How the tables in a relational database are related
How the columns in a table are defined
A brief history of SQL
A comparison of four relational databases
An introduction to the SQL statements
Typical statements for working with database objects
How to query a single table
How to join data from two or more tables
How to add, update, and delete data in a table
SQL coding guidelines
A summary of SQL Server 2022 tools
How to start and stop the database engine
How to enable remote connections
How to connect to a database server
How to navigate through the database objects
How to create database diagrams
How to view the column definitions of a table
How to modify the column definitions
How to view the data of a table
How to modify the data of a table
How to enter and execute a query
How to handle syntax errors
How to open and save queries
The basic syntax of the SELECT statement
SELECT statement examples
How to code column specifications
How to name the columns in a result set
How to code string expressions
How to code arithmetic expressions
How to use functions
How to use the DISTINCT keyword to eliminate duplicate rows
How to use the TOP clause to return a subset of selected rows
How to use comparison operators
How to use the AND, OR, and NOT logical operators
How to use the IN operator
How to use the BETWEEN operator
How to use the LIKE operator
How to use the IS NULL clause
How to sort a result set by a column name
How to sort a result set by an alias, an expression, or a column number
How to retrieve a range of selected rows
How to code an inner join
When and how to use table aliases
How to work with tables from different databases
How to use compound join conditions
How to use a self-join
Inner joins that join more than two tables
How to use the implicit inner join syntax
How to code an outer join
Outer join examples
Outer joins that join more than two tables
How to combine inner and outer joins
How to use cross joins
How to combine data from different tables
How to combine data from the same table
How to use the EXCEPT and INTERSECT operators
How to code aggregate functions
Queries that use aggregate functions
How to code the GROUP BY and HAVING clauses
Queries that use the GROUP BY and HAVING clauses
How the HAVING clause compares to the WHERE clause
How to code complex search conditions
How to use the ROLLUP operator
How to use the CUBE operator
How to use the GROUPING SETS operator
How to use the OVER clause
How to use subqueries
How subqueries compare to joins
How to use subqueries with the IN operator
How to compare the result of a subquery with an expression
How to use the ALL keyword
How to use the ANY and SOME keywords
How to code correlated subqueries
How to use the EXISTS operator
How to code subqueries in the FROM clause
How to code subqueries in the SELECT clause
A complex query that uses subqueries
A procedure for building complex queries
How to code a CTE
How to code a recursive CTE
How to use a copy of the database
How to use the SELECT INTO statement
How to insert a single row
How to insert multiple rows
How to insert default values and null values
How to insert rows selected from another table
How to perform a basic update operation
How to use subqueries in an update operation
How to use joins in an update operation
How to perform a basic delete operation
How to use subqueries and joins in a delete operation
How to perform a basic merge operation
How to code more complex merge operations
Data type overview
The numeric types
The string types
The date/time types
The large value types
How data conversion works
How to convert data using the CAST function
How to convert data using the CONVERT function
How to use the TRY_CONVERT function
How to use other data conversion functions
A summary of the string functions
How to solve common problems that occur with string data
A summary of the numeric functions
How to search for floating-point numbers
A summary of the date/time functions
How to parse dates and times
How to perform operations on dates and times
How to perform a date search
How to perform a time search
How to use the DATE_BUCKET function
How to use the CASE expression
How to use the IIF and CHOOSE functions
How to use the COALESCE expression and the ISNULL function
How to use the GROUPING function
How to use the GREATEST and LEAST functions
How to use the ranking functions
How to use the analytic functions
The basic steps for designing a data structure
How to identify the data elements
How to subdivide the data elements
How to identify the tables and assign columns
How to identify the primary and foreign keys
How to enforce the relationships between tables
How normalization works
How to identify the columns to be indexed
The seven normal forms
How to apply the first normal form
How to apply the second normal form
How to apply the third normal form
When and how to denormalize a data structure
How to create a database
How to create a table
How to create an index
An introduction to constraints
How to use check constraints
How to use foreign key constraints
How to delete an index, table, or database
How to alter a table
How to create a sequence
How to use a sequence
How to delete a sequence
How to alter a sequence
An introduction to character sets and encodings
An introduction to collations
How to view collations
How to specify a collation
How the script works
How the DDL statements work
How to create or delete a database
How to attach or detach a database
How to back up and restore a database
How to set the compatibility level for a database
How to create, modify, or delete a table
How to work with foreign key relationships
How to work with indexes and keys
How to work with check constraints
How to examine table dependencies
How to generate scripts for databases and tables
How to generate a change script when you modify a table
How views work
Benefits of using views
How to create a view
Examples that create views
How to create an updatable view
How to delete or modify a view
How to update rows through a view
How to insert rows through a view
How to delete rows through a view
How to use the catalog views
How to work with scripts
The Transact-SQL statements for script processing
How to work with scalar variables
How to work with table variables
How to work with temporary tables
A comparison of the five types of Transact-SQL table objects
How to perform conditional processing
How to test for the existence of a database object
How to perform repetitive processing
How to use a cursor
How to handle errors
How to use surround-with snippets
How to use the system functions
How to change the session settings
How to use dynamic SQL
Scripts
Stored procedures, user-defined functions, and triggers
An introduction to stored procedures
How to create a stored procedure
How to declare and work with parameters
How to call procedures with parameters
How to work with return values
How to validate data and raise errors
A stored procedure that manages insert operations
How to pass a table as a parameter
How to delete or change a stored procedure
How to work with system stored procedures
An introduction to user-defined functions
How to create a scalar-valued function
How to create and use a table-valued function
How to delete or change a function
How to create a trigger
How to use AFTER triggers
How to use INSTEAD OF triggers
How to use triggers to enforce data consistency
How to delete or change a trigger
How transactions maintain data integrity
SQL statements for handling transactions
How to work with nested transactions
How to work with save points
The four concurrency problems that locks can prevent
How to set the transaction isolation level
Lockable resources and lock escalation
Lock modes and lock promotion
Lock mode compatibility
Two transactions that deadlock
Coding techniques that prevent deadlocks
An introduction to SQL Server security
How to change the authentication mode
How to create login IDs
How to delete or change login IDs or passwords
How to work with database users
How to work with schemas
How to grant or revoke object permissions
The SQL Server object permissions
How to grant or revoke schema permissions
How to grant or revoke database permissions
How to grant or revoke server permissions
How to work with the fixed server roles
How to work with user-defined server roles
How to display information about server roles and role members
How to work with the fixed database roles
How to work with user-defined database roles
How to display information about database roles and role members
How to deny permissions granted by role membership
How to work with application roles
How to work with login IDs
How to work with the server roles for a login ID
How to assign database access and roles by login ID
How to assign user permissions to database objects
How to work with database permissions
How to open the Connection dialog box
How to connect to a database server
How to navigate through the database objects
How to view the column definitions of a table
How to modify the column definitions
How to view the data of a table
How to modify the data
How to enter and run a query
How to handle syntax errors
How to open and save queries
How to use the Explorer window
How to work with extensions
How to visualize data
An introduction to Azure SQL
How to create a SQL database
How to configure a SQL server
How to configure a SQL database
How to connect to a SQL database
How to run a script that creates the tables for a SQL database
How to query a SQL database
An introduction to Data Migration Assistant
How to migrate a SQL Server database to Azure
How to install SQL Server 2022 Express
How to install SQL Server Management Studio
How to download the files for this book
How to create the databases for this book
How to restore the databases for this book
How to install Azure Data Studio
The instructor’s materials that you can request from this site provide everything you need for an effective course.
For a detailed description of all the materials, please see the Instructor’s Summary PDF. And if you use the Canvas LMS, we also provide a Canvas course file that you can use to import all of these materials with just a few clicks.
On this page, we’ll be posting answers to the questions that come up most often about this book. So if you have any questions that you haven’t found answered here at our site, please email us. Thanks!
There are no book corrections that we know of at this time. But if you find any, please email us, and we’ll post any corrections that affect the technical accuracy of the book here. Thank you!
This is our site for college instructors. To buy Murach books, please visit our retail site.