Kết quả 1 đến 2 của 2
Chủ đề: pro sql giúp với
-
18-11-10, 04:57 PM #1
pro sql giúp với
mình có cái db dang xxx.sql, ko phải giống sql của web thì import là xong, nó dành cho sql 2000 hay 2005 gì đó nhưng mình làm ko dc
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = N'irisdb')
CREATE USER [irisdb] FOR LOGIN [irisdb] WITH DEFAULT_SCHEMA=[dbo]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[TB_ITEM_DISJOINT]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[TB_ITEM_DISJOINT](
[IDX] [int] IDENTITY(1,1) NOT NULL,
[INDEX] [int] NOT NULL,
[PRICE] [int] NOT NULL,
[ITEM_DEFINE_INDEX1] [int] NOT NULL CONSTRAINT [DF_TB_ITEM_DISJOINT_ITEM_DEFINE_INDEX1] DEFAULT ((0)),
[INVENTORY_COUNT1] [smallint] NOT NULL CONSTRAINT [DF_TB_ITEM_DISJOINT_INVENTORY_COUNT1] DEFAULT ((0)),
[ITEM_DEFINE_INDEX2] [int] NOT NULL CONSTRAINT [DF_TB_ITEM_DISJOINT_ITEM_DEFINE_INDEX2] DEFAULT ((0)),
[INVENTORY_COUNT2] [smallint] NOT NULL CONSTRAINT [DF_TB_ITEM_DISJOINT_INVENTORY_COUNT2] DEFAULT ((0)),
[ITEM_DEFINE_INDEX3] [int] NOT NULL CONSTRAINT [DF_TB_ITEM_DISJOINT_ITEM_DEFINE_INDEX3] DEFAULT ((0)),
[INVENTORY_COUNT3] [smallint] NOT NULL CONSTRAINT [DF_TB_ITEM_DISJOINT_INVENTORY_COUNT3] DEFAULT ((0)),
[ITEM_DEFINE_INDEX4] [int] NOT NULL CONSTRAINT [DF_TB_ITEM_DISJOINT_ITEM_DEFINE_INDEX4] DEFAULT ((0)),
[INVENTORY_COUNT4] [smallint] NOT NULL CONSTRAINT [DF_TB_ITEM_DISJOINT_INVENTORY_COUNT4] DEFAULT ((0)),
[ITEM_DEFINE_INDEX5] [int] NOT NULL CONSTRAINT [DF_TB_ITEM_DISJOINT_ITEM_DEFINE_INDEX5] DEFAULT ((0)),
[INVENTORY_COUNT5] [smallint] NOT NULL CONSTRAINT [DF_TB_ITEM_DISJOINT_INVENTORY_COUNT5] DEFAULT ((0)),
[ITEM_DEFINE_INDEX6] [int] NOT NULL CONSTRAINT [DF_TB_ITEM_DISJOINT_ITEM_DEFINE_INDEX6] DEFAULT ((0)),
[INVENTORY_COUNT6] [smallint] NOT NULL CONSTRAINT [DF_TB_ITEM_DISJOINT_INVENTORY_COUNT6] DEFAULT ((0)),
CONSTRAINT [PK_TB_ITEM_DISJOINT] PRIMARY KEY CLUSTERED
(
[IDX] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM sys.indexes WHERE object_id = OBJECT_ID(N'[dbo].[TB_ITEM_DISJOINT]') AND name = N'IX_TB_ITEM_DISJOINT')
CREATE NONCLUSTERED INDEX [IX_TB_ITEM_DISJOINT] ON [dbo].[TB_ITEM_DISJOINT]
(
[INDEX] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'고유번호' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'TB_ITEM_DISJOINT', @level2type=N'COLUMN', @level2name=N'IDX'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'기획:분류번호' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'TB_ITEM_DISJOINT', @level2type=N'COLUMN', @level2name=N'INDEX'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'비용' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'TB_ITEM_DISJOINT', @level2type=N'COLUMN', @level2name=N'PRICE'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'아이템1(TB_ITEM_DEFINE::INDEX)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'TB_ITEM_DISJOINT', @level2type=N'COLUMN', @level2name=N'ITEM_DEFINE_INDEX1'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'인벤토리 지급 수량1' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'TB_ITEM_DISJOINT', @level2type=N'COLUMN', @level2name=N'INVENTORY_COUNT1'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'아이템2(TB_ITEM_DEFINE::INDEX)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'TB_ITEM_DISJOINT', @level2type=N'COLUMN', @level2name=N'ITEM_DEFINE_INDEX2'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'인벤토리 지급 수량2' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'TB_ITEM_DISJOINT', @level2type=N'COLUMN', @level2name=N'INVENTORY_COUNT2'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'아이템3(TB_ITEM_DEFINE::INDEX)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'TB_ITEM_DISJOINT', @level2type=N'COLUMN', @level2name=N'ITEM_DEFINE_INDEX3'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'인벤토리 지급 수량3' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'TB_ITEM_DISJOINT', @level2type=N'COLUMN', @level2name=N'INVENTORY_COUNT3'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'아이템4(TB_ITEM_DEFINE::INDEX)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'TB_ITEM_DISJOINT', @level2type=N'COLUMN', @level2name=N'ITEM_DEFINE_INDEX4'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'인벤토리 지급 수량4' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'TB_ITEM_DISJOINT', @level2type=N'COLUMN', @level2name=N'INVENTORY_COUNT4'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'아이템5(TB_ITEM_DEFINE::INDEX)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'TB_ITEM_DISJOINT', @level2type=N'COLUMN', @level2name=N'ITEM_DEFINE_INDEX5'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'인벤토리 지급 수량5' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'TB_ITEM_DISJOINT', @level2type=N'COLUMN', @level2name=N'INVENTORY_COUNT5'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'아이템6(TB_ITEM_DEFINE::INDEX)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'TB_ITEM_DISJOINT', @level2type=N'COLUMN', @level2name=N'ITEM_DEFINE_INDEX6'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'인벤토리 지급 수량6' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'TB_ITEM_DISJOINT', @level2type=N'COLUMN', @level2name=N'INVENTORY_COUNT6'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[GP_INIT]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
ah wen cái này ko phải db của vl, vì post vl sôi nôi nên mình vô hỏi sr các bạnKhách viếng thăm hãy cùng thuanthienkiem xây dựng diễn đàn CLBGAMESVN vững mạnh nhé!
-
18-11-10, 05:22 PM #2
- Ngày tham gia
- Dec 2009
- Đang ở
- Nha Trang
- Bài viết
- 1,052
- Thanks
- 194
- Thanked 1,181 Times in 213 Posts
Ðề: pro sql giúp vơi
tạo new db, rồi vô anly chọn vô cái db vừa tạo, copy rồi paste vô rồi f5
Bishop check pass KT
Source KT online