3 Mar 2016

Insert script for INDIA States and Districts SQL

  // Latest List Updated here



CREATE TABLE [dbo].[tbl_Countries](
       [CountryID] [int] IDENTITY(1,1) NOT NULL,
       [CountryName] [nvarchar](max) NULL,
PRIMARY KEY CLUSTERED
(
       [CountryID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
/****** Object:  Table [dbo].[tbl_Districts]     ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tbl_Districts](
       [DistrictID] [int] IDENTITY(1,1) NOT NULL,
       [StateID] [int] NULL,
       [DistrictName] [nvarchar](max) NULL,
PRIMARY KEY CLUSTERED
(
       [DistrictID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
/****** Object:  Table [dbo].[tbl_States]     ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[tbl_States](
       [StateID] [int] IDENTITY(1,1) NOT NULL,
       [CountryID] [int] NULL,
       [StateName] [nvarchar](max) NULL,
PRIMARY KEY CLUSTERED
(
       [StateID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO
SET IDENTITY_INSERT [dbo].[tbl_Countries] ON

GO
INSERT [dbo].[tbl_Countries] ([CountryID], [CountryName]) VALUES (1, N'India')
GO
SET IDENTITY_INSERT [dbo].[tbl_Countries] OFF
GO
SET IDENTITY_INSERT [dbo].[tbl_Districts] ON

GO
INSERT [dbo].[tbl_Districts] ([DistrictID], [StateID], [DistrictName]) VALUES (1, 2, N'Visakhapatnam')
GO
INSERT [dbo].[tbl_Districts] ([DistrictID], [StateID], [DistrictName]) VALUES (2, 2, N'Vijayawada')

GO
SET IDENTITY_INSERT [dbo].[tbl_Districts] OFF
GO
SET IDENTITY_INSERT [dbo].[tbl_States] ON

GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (1, 1, N'ANDAMAN AND NICOBAR ISLANDS')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (2, 1, N'ANDHRA PRADESH')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (3, 1, N'ARUNACHAL PRADESH')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (4, 1, N'ASSAM')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (5, 1, N'BIHAR')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (6, 1, N'CHATTISGARH')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (7, 1, N'CHANDIGARH')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (8, 1, N'DAMAN AND DIU')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (9, 1, N'DELHI')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (10, 1, N'DADRA AND NAGAR HAVELI')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (11, 1, N'GOA')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (12, 1, N'GUJARAT')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (13, 1, N'HIMACHAL PRADESH')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (14, 1, N'HARYANA')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (15, 1, N'JAMMU AND KASHMIR')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (16, 1, N'JHARKHAND')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (17, 1, N'KERALA')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (18, 1, N'KARNATAKA')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (19, 1, N'LAKSHADWEEP')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (20, 1, N'MEGHALAYA')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (21, 1, N'MAHARASHTRA')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (22, 1, N'MANIPUR')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (23, 1, N'MADHYA PRADESH')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (24, 1, N'MIZORAM')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (25, 1, N'NAGALAND')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (26, 1, N'ORISSA')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (27, 1, N'PUNJAB')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (28, 1, N'PONDICHERRY')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (29, 1, N'RAJASTHAN')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (30, 1, N'SIKKIM')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (31, 1, N'TAMIL NADU')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (32, 1, N'TRIPURA')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (33, 1, N'UTTARAKHAND')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (34, 1, N'UTTAR PRADESH')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (35, 1, N'WEST BENGAL')
GO
INSERT [dbo].[tbl_States] ([StateID], [CountryID], [StateName]) VALUES (36, 1, N'Telangana')
GO

SET IDENTITY_INSERT [dbo].[tbl_States] OFF
GO




No comments:

Post a Comment