Search
 
SCRIPT & CODE EXAMPLE
 

SQL

create table sql server

CREATE TABLE schema_name.table_name (
  ID_column INT NOT NULL IDENTITY(1,1) PRIMARY KEY,
  column_1 data_type NOT NULL,
  column_2 data_type 
);
Comment

create table in microsoft sql server

CREATE TABLE [database_name.][schema_name.]table_name (
    pk_column data_type PRIMARY KEY,
    column_1 data_type NOT NULL,
    column_2 data_type,
    ...,
    table_constraints
);
Comment

Create table Statement Syntax in SQL Server

--****************** For More help, visit NAYCode.com
CREATE TABLE [table_name]
(
  Col1 [datatype],
  Col2 [datatype]
  CONSTRAINT [PK_Name] PRIMARY KEY CLUSTERED 
  (
	[Col1] ASC
  )
)
Comment

Create table in SQL Server

-- ********************** For more tutorial - Visit NAYCode.com 
CREATE TABLE [dbo].[Customers](
	[Cust_Id] [int] NOT NULL,
	[Cust_Name] [nvarchar](50) NULL,
	[Cust_Address] [nvarchar](100) NULL,
	[Cust_Phone] [nvarchar](50) NULL,
	[Cust_DOB] [datetime] NULL,
 CONSTRAINT [PK_Customers] PRIMARY KEY CLUSTERED 
(
	[Cust_Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
Comment

PREVIOUS NEXT
Code Example
Sql :: create table if not exist in sqlite 
Sql :: alter default column value oracle 
Sql :: mariadb get column names from table 
Sql :: restart mysql server ubuntu 
Sql :: how to change table name in sqlite 
Sql :: oracle first and last day of previous month 
Sql :: best configuration for display table in sqlplus 
Sql :: grant lock tables privilege mysql 
Sql :: change mysql password from command line 
Sql :: t-sql test if table exists 
Sql :: ora-01950 no privileges on tablespace 
Sql :: group_concat max length mysql 
Sql :: psql lst trigger 
Sql :: create schema postgres 
Sql :: drop db syntax 
Sql :: sql like variable 
Sql :: postgres drop column if exists 
Sql :: Postgres upgrade to superuser 
Sql :: sql throw error 
Sql :: oracle sql drop table 
Sql :: mysql bidirectional composite primary key 
Sql :: oracle list datafiles in tablespace 
Sql :: mysql find foreign key references 
Sql :: oracle sql truncate table 
Sql :: get rows affected mysql python 
Sql :: date_format for time sql 
Sql :: how to see all table partition in oracle 
Sql :: alter table change default 
Sql :: remove all records from table mysql 
Sql :: inner join php my admin 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =