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 :: sql server previous month 
Sql :: how to create external table in hive 
Sql :: mysql run sql file 
Sql :: sql round 2 decimal 
Sql :: sql cheatsheet 
Sql :: reindexing all tables sql server 
Sql :: sql server create constraint 
Sql :: regenerate assets odoo 
Sql :: query distinct 
Sql :: how to add month in update sql 
Sql :: select columns postgres 
Sql :: postgres update single column 
Sql :: how to delete data from sql database in android 
Sql :: mysql create procedure phpmyadmin 
Sql :: mysql select statement after index 
Sql :: sql download for windows 10 
Sql :: Add image in MySQL database 
Sql :: datepart sql server 
Sql :: min max sql 
Sql :: sql server convert to guid 
Sql :: mysql count rows returned 
Sql :: sql not equal 
Sql :: mysql add columns 
Sql :: sql create tabel with primary key auto_increment code 
Sql :: format the money fied with comma in international system using sql 
Sql :: sql select from multiple tables without join 
Sql :: json_value oracle 
Sql :: oracle all dates between two dates 
Sql :: Add new column T-SQL 
Sql :: sql alter column name sql server 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =