· 8 years ago · Apr 25, 2018, 09:26 PM
1-- Create a new table called 'T1' in schema 'dbo'
2-- Drop the table if it already exists
3IF OBJECT_ID('dbo.T1', 'U') IS NOT NULL
4DROP TABLE dbo.T1
5GO
6-- Create the table in the specified schema
7CREATE TABLE dbo.T1
8(
9 EmployeesId INT NOT NULL PRIMARY KEY, -- primary key column
10 Name [NVARCHAR](50) NOT NULL,
11 Location [NVARCHAR](50) NOT NULL
12);
13GO