From the course: Microsoft SQL Server 2022 Essential Training
Unlock this course with a free trial
Join today to access over 24,100 courses taught by industry experts.
Create a table with T-SQL - SQL Server Tutorial
From the course: Microsoft SQL Server 2022 Essential Training
Create a table with T-SQL
- [Instructor] To start writing your own SQL Commands in Management Studio, you'll start with the new query button here on the toolbar or press control N on your keyboard. That'll open up a new blank query editing window for you to get started in. Now when you activate this window, the second row of tools here in the interface activates. This is called the SQL Editor toolbar. If you're not seeing this toolbar, you can go up to the view menu, point to toolbars, and you can activate it right here. Now, there's two important elements that I want to point out right off the bat. On the toolbar is a dropdown menu where you can select the target database for your script. When you expand this panel, it shows you all the other databases on the same server so you could target your script to any of those. Make sure that our script is currently targeting the Red30 Tech database. I don't want to accidentally create a table…
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
-
-
-
-
-
-
-
Understand the role of T-SQL2m 40s
-
(Locked)
Use the T-SQL editor6m 49s
-
(Locked)
Create a table with T-SQL6m 33s
-
(Locked)
Solution: Create tables with T-SQL commands3m 46s
-
(Locked)
Add data to a table4m 58s
-
(Locked)
Solution: Add data with T-SQL commands3m 4s
-
(Locked)
Retrieve records with SELECT4m 3s
-
(Locked)
Solution: Query data in a database2m 7s
-
(Locked)
Filter returned results with WHERE3m 12s
-
(Locked)
Sort records2m 54s
-
(Locked)
Solution: Filter and sort data with a query4m 27s
-
(Locked)
Delete records from a table4m 31s
-
(Locked)
Update records in a table2m 3s
-
(Locked)
Solution: Remove and update records in a table6m 11s
-
(Locked)
Joining related tables4m 32s
-
(Locked)
Solution: Query information from related tables5m 33s
-
(Locked)
Remove a table from the database5m 7s
-
-
-
-
-
-