There are several ways to produce the schema of a SQL 2008/2012 table but the on I use is:
- Open SQL SERVER MANAGEMENT STUDIO
- Expand DATABASES
- Expand the database in question
- Expand TABLES
- Right Click on the table in question
- Select SCRIPT TABLE AS
- Select CREATE TO
- Select FILE
- Enter an name save the file
- You can then open the resulting SQL file with either Notepad or SQL QUERY
Bingo… there is your schema!
[ContactName] [nvarchar](100) NOT NULL,
[ContactPrefix] [nvarchar](25) NULL,
[ContactFirstName] [nvarchar](50) NULL,
[ContactMiddleName] [nvarchar](50) NULL,
[ContactLastName] [nvarchar](50) NULL,
[ContactSuffix] [nvarchar](25) NULL,
[ContactNickname] [nvarchar](50) NULL,
[ContactBusinessPhone] [nvarchar](25) NULL,
[ContactBusinessFax] [nvarchar](25) NULL,
[ContactMobilePhone] [nvarchar](25) NULL,
[ContactHomePhone] [nvarchar](25) NULL,
[ContactOtherPhone] [nvarchar](25) NULL,
[ContactPager] [nvarchar](25) NULL,
[ContactEmail1] [nvarchar](50) NULL,
[ContactEmail2] [nvarchar](50) NULL,
0 Comments