From the course: Microsoft SQL Server 2019 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Use the T-SQL editor

Use the T-SQL editor - SQL Server Tutorial

From the course: Microsoft SQL Server 2019 Essential Training

Start my 1-month free trial

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 the new table inside of the LandonHotel database, and not, for…

Contents