From the course: Microsoft SQL Server 2019 Essential Training
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Use the T-SQL editor - SQL Server Tutorial
From the course: Microsoft SQL Server 2019 Essential Training
Use the T-SQL editor
- [Instructor] Management Studio's code editor has some features that'll make writing commands in the T-SQL language easier. In the Object Explorer we can quickly review the code that would be required to recreate some of our existing objects through the right-click menu. For instance, I'll come over here in the LandonHotel, inside of the the Tables folder. I'm going to right-click on RoomRservations, and then choose Script Table as, CREATE To, and then a New Query Editor Window. That opens up a new code editor tab, here on the right side of the screen. And we can see what it would take to create this exact table in our database. So let's go ahead and spend a few minutes and read through this text. Starting at the very top, we has a USE statement, and it says USE LandonHotel. This basically tells the system which database we're going to be creating an object within. That way, when we execute the script, it knows to put…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Understand the role of T-SQL1m 59s
-
(Locked)
Use the T-SQL editor6m 4s
-
(Locked)
Create a table with T-SQL5m 28s
-
(Locked)
Solution: Create tables with T-SQL commands3m 48s
-
(Locked)
Add data to a table3m 41s
-
(Locked)
Solution: Add data with T-SQL commands3m 3s
-
(Locked)
Retrieve records with SELECT3m 28s
-
(Locked)
Solution: Query data in a database2m 3s
-
(Locked)
Filter returned results with WHERE1m 51s
-
(Locked)
Sort records2m 42s
-
(Locked)
Solution: Filter and sort data with a query4m 22s
-
(Locked)
Delete records from a table3m 32s
-
(Locked)
Update records in a table3m 4s
-
(Locked)
Solution: Remove and update records in a table6m 22s
-
(Locked)
Join related tables5m 1s
-
(Locked)
LEFT JOIN and RIGHT JOIN2m 16s
-
(Locked)
Solution: Query information from related tables5m 43s
-
(Locked)
Remove a table from the database4m 6s
-
(Locked)
-
-
-
-
-
-