SQL Server Management Studio – Query Tool
[Note: If you have difficulties to open the Virtual Lab Workbench from the Classroom, you may try the following URL: https://ecampus.phoenix.edu/content/material/materialhandler.aspx?contentTypeID=5174 You may need to cut and paste the above URL on the address of the browser. If you are using IE, then you may try other browsers (e.g, Firefox). ] From the Virtual lab, click on Lab Access to open the Workbench.
Next, click on SQL Server Management Studio on the Workbench:
Click OK (if you see the above message).
Move the mouse pointer on New Query as shown below
Select New Query. Now, you see the following window:
The SQL query window is where you enter the code and execute the program for creating the database and database tables. You also enter codes here for all the database activities as illustrated below:
1. To create a database, say, TEST_DB, enter the following code: CREATE DATABASE TEST_DB GO Highlight this portion of the code, and then click on “! Execute”.
Review the message window to make sure the command has been completed. Also click on Databases folder to the left to expand the folder and verify that TEST_DB has been created (see the following figure):
Now enter the following code to create a table VehicleType in the SQL Query window:
USE [TEST_DB] GO CREATE TABLE VehicleType ( Type_ID varchar(10) not null Description varchar(200) not null ); Go Select this portion of the code and Execute. The VehichleType table is now created. Right Click the TEST_DB folder to the left and refresh the database. Now, verify that the VehicleType is created as shown below:
Next insert the data to the table by entering the following code in the Query window and executing the code:
INSERT into VehicleType Values ('S101','First Type'), ('X102','Second Type'), ('A103','Third Type'); go Finally execute the following query program to see the data entered into...