PDA

View Full Version : [MU] Ai cho e xin tổng hợp Query của NNB từ 2.0>> với



lskhongten
01-05-12, 12:33 PM
Ai có querry thì send wa giúp e với cả nhà

Domino9990
01-05-12, 12:38 PM
Ai có querry thì send wa giúp e với cả nhà
query 2.0 nbb.................

//--------------------------------------------------------------------------------------
//--------------------------- Chay Query -----------------------------------------------
//--------------------------------------------------------------------------------------
CREATE TABLE [Character_back] (
[AccountID] [varchar] (10) NOT NULL ,
[Name] [varchar] (10) NOT NULL ,
[LevelUpPoint] [int] NULL DEFAULT (0),
[Class] [tinyint] NULL ,
[Leadership] [smallint] NULL DEFAULT (0),
[Resets] [int] NOT NULL DEFAULT (0),
[Relifes] [int] NOT NULL DEFAULT (0)
) ON [PRIMARY]
GO
--------------------------------------------------------------
CREATE TABLE [CardPhone] (
[stt] [int] IDENTITY (1, 1) NOT NULL ,
[acc] [varchar] (20) NULL ,
[Name] [varchar] (10) NULL ,
[menhgia] [int] NULL ,
[card_type] [varchar] (20) NULL ,
[card_num] [varchar] (20) NULL ,
[card_serial] [varchar] (20) NULL ,
[ngay] [smalldatetime] NULL ,
[status] [tinyint] NULL ,
[addvpoint] [varchar] (20) NULL ,
[timenap] [int] NULL,
[timeduyet] [int] NULL
) ON [PRIMARY]
GO
--------------------------------------------------------------
CREATE TABLE [Card_Vpoint] (
[Name] [int] NOT NULL DEFAULT (0),
[accdl] [varchar] (20) NULL ,
[menhgia] [int] NULL ,
[card_num] [varchar] (20) NULL ,
[card_serial] [varchar] (20) NULL ,
[time_create] [int] NULL ,
[accused] [varchar] (20) NULL ,
[timenap] [int] NULL,
[status] [tinyint] NULL
) ON [PRIMARY]
GO
--------------------------------------------------------------
CREATE TABLE [DoanhThu] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[year] [int] NOT NULL DEFAULT (2008),
[month] [int] NOT NULL DEFAULT (1),
[money] [int] NOT NULL DEFAULT (0),
[card_type] [varchar] (20) NULL
) ON [PRIMARY]
GO
--------------------------------------------------------------
CREATE TABLE [DaiLy] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[accdl] [varchar] (20) NOT NULL ,
[password] [varchar] (50) NOT NULL ,
[Name] [varchar] (255) NULL,
[Address] [varchar] (255) NULL,
[City] [varchar] (50) NULL,
[telephone] [varchar] (20) NULL,
[NumComputer] [int] NULL,
[yahoo] [varchar] (50) NULL,
[vpoint] [int] NOT NULL DEFAULT (0),
[status] [tinyint] NULL
) ON [PRIMARY]
GO

--------------------------------------------------------------
CREATE TABLE [RegVIP] (
[AccountID] [varchar] (10) NOT NULL ,
[timedk] [int] NULL
) ON [PRIMARY]
GO
--------------------------------------------------------------
CREATE TABLE [TopMonth] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[stt] [int] NOT NULL DEFAULT (0) ,
[acc] [varchar] (20) NULL ,
[Name] [varchar] (10) NULL ,
[resets] [int] NOT NULL DEFAULT (0),
[Month] [int] NOT NULL DEFAULT (0) ,
[Year] [int] NOT NULL DEFAULT (0)
) ON [PRIMARY]
GO
--------------------------------------------------------------
CREATE TABLE [Check_Action] (
[id] [int] IDENTITY (1, 1) NOT NULL ,
[action] [varchar] (20) NULL ,
[time] [int] NOT NULL DEFAULT (0),
[status] [tinyint] NOT NULL DEFAULT (0)
) ON [PRIMARY]
GO
INSERT INTO Check_Action (action) VALUES ('ResetInDay')
INSERT INTO Check_Action (action) VALUES ('ResetInMonth')
INSERT INTO Check_Action (action) VALUES ('Top10RS')
--------------------------------------------------------------
alter table MEMB_INFO add bank bigint NOT NULL default 0
alter table MEMB_INFO add vpoint bigint NOT NULL default 0
alter table MEMB_INFO add gcoin bigint NOT NULL default 0
alter table MEMB_INFO add memb__pwd2 char(10)
alter table MEMB_INFO add memb__pwdmd5 char(50)
alter table MEMB_INFO add pass2 char(10)
alter table MEMB_INFO add jewel_chao int not null default 0
alter table MEMB_INFO add jewel_cre int not null default 0
alter table MEMB_INFO add jewel_blue int not null default 0

alter table Character add Resets int not null default 0
alter table Character add ResetVIP int not null default 0
alter table Character add Resets_Time int not null default 0
alter table Character add NoResetInDay int not null default 0
alter table Character add NoResetInMonth int not null default 0
alter table Character add Relifes int not null default 0
alter table Character add khoado tinyint not null default 0
alter table Character add makhoado varchar(50)
alter table Character add IsThuePoint tinyint not null default 0
alter table Character add TimeThuePoint int not null default 0
alter table Character add PointThue int not null default 0
alter table Character add ErrorSubBlock tinyint not null default 0
alter table Character add pointdutru int not null default 0
alter table Character add UyThac tinyint not null default 0
alter table Character add uythacoffline_stat int not null default 0
alter table Character add uythacoffline_time int not null default 0
alter table Character add PointUyThac int not null default 0
alter table Character add Onlinetime int not null default 0
Alter table Character add point_event int not null default 0
Alter table Character add event1_type1 int not null default 0
Alter table Character add event1_type2 int not null default 0
Alter table Character add event1_type3 int not null default 0

//--------------------------------------------------------------------------------------
//--------------------------- Chay Query -----------------------------------------------
//--------------------------------------------------------------------------------------

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[VI_CURR_INFO]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[VI_CURR_INFO]
GO

CREATE TABLE [dbo].[VI_CURR_INFO] (
[ends_days] [nvarchar] (8) COLLATE Chinese_PRC_CI_AS NULL ,
[chek_code] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[used_time] [int] NULL ,
[memb___id] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[memb_name] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[memb_guid] [int] NOT NULL ,
[sno__numb] [nvarchar] (18) COLLATE Chinese_PRC_CI_AS NOT NULL ,
[Bill_Section] [int] NULL ,
[Bill_Value] [int] NULL ,
[Bill_Hour] [int] NULL ,
[Surplus_Point] [int] NULL ,
[Surplus_Minute] [datetime] NULL ,
[Increase_Days] [int] NULL
) ON [PRIMARY]
GO