Create Microsoft SQL Azure Database Read-Only User

To create a login (server wide account) which uses a simple username + password combination for SQL authentication: CREATE LOGIN ReadOnlyUserName WITH PASSWORD = ‘strong_password’; NOTE: This allows the user to connect using SQL Management Studio. It is not required if the user only needs to connect to a specific database.   To create a user to … Read more

MS SQL script to create database and add data

This Microsoft SQL script was used to create a database table named colbert_stateFacts with fields stID, state_name, state_capital, state_code, state_bird and state_flower. The script then inserted records into the new table. CREATE TABLE [dbo].[colbert_stateFacts] ( [stID] [int] IDENTITY(1,1) NOT NULL, [state_name] [nvarchar](50) NOT NULL, [state_capital] [nvarchar](50) NOT NULL, [state_code] [nvarchar](2) NOT NULL, [state_bird] [nvarchar](50) NULL, … Read more