To create a table in sql server we cam follow two steps:
- Design View
- Using Query window
Click to open sql server management studio and login to the server.
Then select database by expanding database section
If you dont have any database then create it by right clicking on database and then create database.
Then Select database and expand it and right click on tables and click on new table.
Follow the data type with column names and allow nulls to fields which would be null or not null.
Now save the table by following Ctrl+S or save icon and give a table name .
To create a table using query window we need to use sql query.
The sql query to create table is:
CREATE TABLE [dbo].[mytable] (
[id] [bigint] NOT NULL,
[colum1] [varchar](50) NULL,
[column2] [datetime] NULL,
[column3] [bit] NULL