Monday, October 19, 2015

SQL Server Create Database Script

 SQL Server script to create a database with multiple File Groups


SQL Server Create Schema Script

 SQL Server script to create a schema and grant a user or security group SELECT access




SQL Server Create Table Script

 Sample SQL Script to create a table with the following requirements:

  1. Auto Incrementing numeric Primary Key
  2. Columns with default values (InsertDate and UpdateDate)
  3. Calculated column (Age)
  4. Unique constraint to prevent duplicate records
  5. Check constraint to limit data
  6. Foreign Key constraint to create data relationship
  7. Specify File Group for data storage