📄 用户数据库.sql
字号:
USE [master]
GO
/****** 对象: Database [QPGameUserDB] 脚本日期: 01/23/2008 14:54:42 ******/
IF NOT EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'QPGameUserDB')
BEGIN
CREATE DATABASE [QPGameUserDB]
END
GO
ALTER DATABASE [QPGameUserDB] SET ANSI_NULL_DEFAULT OFF
GO
ALTER DATABASE [QPGameUserDB] SET ANSI_NULLS OFF
GO
ALTER DATABASE [QPGameUserDB] SET ANSI_PADDING OFF
GO
ALTER DATABASE [QPGameUserDB] SET ANSI_WARNINGS OFF
GO
ALTER DATABASE [QPGameUserDB] SET ARITHABORT OFF
GO
ALTER DATABASE [QPGameUserDB] SET AUTO_CLOSE OFF
GO
ALTER DATABASE [QPGameUserDB] SET AUTO_CREATE_STATISTICS ON
GO
ALTER DATABASE [QPGameUserDB] SET AUTO_SHRINK OFF
GO
ALTER DATABASE [QPGameUserDB] SET AUTO_UPDATE_STATISTICS ON
GO
ALTER DATABASE [QPGameUserDB] SET CURSOR_CLOSE_ON_COMMIT OFF
GO
ALTER DATABASE [QPGameUserDB] SET CURSOR_DEFAULT GLOBAL
GO
ALTER DATABASE [QPGameUserDB] SET CONCAT_NULL_YIELDS_NULL OFF
GO
ALTER DATABASE [QPGameUserDB] SET NUMERIC_ROUNDABORT OFF
GO
ALTER DATABASE [QPGameUserDB] SET QUOTED_IDENTIFIER OFF
GO
ALTER DATABASE [QPGameUserDB] SET RECURSIVE_TRIGGERS OFF
GO
ALTER DATABASE [QPGameUserDB] SET READ_WRITE
GO
ALTER DATABASE [QPGameUserDB] SET RECOVERY FULL
GO
ALTER DATABASE [QPGameUserDB] SET MULTI_USER
GO
if ( ((@@microsoftversion / power(2, 24) = 8) and (@@microsoftversion & 0xffff >= 760)) or (@@microsoftversion / power(2, 24) >= 9) )begin exec dbo.sp_dboption @dbname = N'QPGameUserDB', @optname = 'db chaining', @optvalue = 'OFF' endUSE [QPGameUserDB]
GO
/****** 对象: Table [dbo].[AccountsInfo] 脚本日期: 01/23/2008 14:55:03 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[dbo].[AccountsInfo]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)
BEGIN
CREATE TABLE [dbo].[AccountsInfo](
[UserID] [int] IDENTITY(1,1) NOT NULL,
[GameID] [int] NOT NULL CONSTRAINT [DF_AccountsInfo_GameID] DEFAULT ((0)),
[ProtectID] [int] NOT NULL CONSTRAINT [DF_UserAccounts_ProtectID] DEFAULT ((0)),
[Accounts] [nvarchar](31) NOT NULL,
[RegAccounts] [nvarchar](31) NOT NULL,
[UnderWrite] [nvarchar](63) NOT NULL CONSTRAINT [DF_UserAccounts_UnderWrite] DEFAULT (''),
[LogonPass] [nchar](32) NOT NULL,
[InsurePass] [nchar](32) NOT NULL,
[SpreaderID] [nvarchar](31) NOT NULL CONSTRAINT [DF_AccountsInfo_SpreaderID] DEFAULT (N''),
[FaceID] [smallint] NOT NULL CONSTRAINT [DF_UserAccounts_FaceID] DEFAULT ((0)),
[Experience] [int] NOT NULL CONSTRAINT [DF_UserAccounts_Experience] DEFAULT ((0)),
[UserRight] [int] NOT NULL CONSTRAINT [DF_AccountsInfo_UserRight] DEFAULT ((0)),
[MasterRight] [int] NOT NULL CONSTRAINT [DF_AccountsInfo_MasterRight] DEFAULT ((0)),
[ServiceRight] [int] NOT NULL CONSTRAINT [DF_AccountsInfo_ServiceRight] DEFAULT ((0)),
[MasterOrder] [tinyint] NOT NULL CONSTRAINT [DF_AccountsInfo_MasterOrder] DEFAULT ((0)),
[MemberOrder] [tinyint] NOT NULL CONSTRAINT [DF_UserAccounts_MemberOrder] DEFAULT ((0)),
[MemberOverDate] [datetime] NOT NULL CONSTRAINT [DF_UserAccounts_MemberOverDate] DEFAULT (((1980)-(1))-(1)),
[Loveliness] [int] NOT NULL CONSTRAINT [DF_AccountsInfo_Loveliness] DEFAULT ((0)),
[Gender] [tinyint] NOT NULL CONSTRAINT [DF_UserAccounts_Gender] DEFAULT ((0)),
[Nullity] [bit] NOT NULL CONSTRAINT [DF_UserAccounts_ServiceNullity] DEFAULT ((0)),
[StunDown] [bit] NOT NULL CONSTRAINT [DF_AccountsInfo_CloseDown] DEFAULT ((0)),
[MoorMachine] [tinyint] NOT NULL CONSTRAINT [DF_AccountsInfo_MoorMachine] DEFAULT ((0)),
[MachineSerial] [nchar](32) NOT NULL CONSTRAINT [DF_AccountsInfo_MachineSerial] DEFAULT (''),
[WebLogonTimes] [int] NOT NULL CONSTRAINT [DF_AccountsInfo_WebLogonTimes] DEFAULT ((0)),
[GameLogonTimes] [int] NOT NULL CONSTRAINT [DF_UserAccounts_AllLogonTimes] DEFAULT ((0)),
[RegisterIP] [nvarchar](15) NOT NULL,
[LastLogonIP] [nvarchar](15) NOT NULL,
[RegisterDate] [datetime] NOT NULL CONSTRAINT [DF_UserAccounts_RegisterDate] DEFAULT (getdate()),
[LastLogonDate] [datetime] NOT NULL CONSTRAINT [DF_UserAccounts_LastLogonDate] DEFAULT (getdate()),
CONSTRAINT [PK_AccountsInfo_UserID] PRIMARY KEY CLUSTERED
(
[UserID] ASC
)
)
END
GO
/****** 对象: Index [IX_AccountsInfo_Accounts] 脚本日期: 01/23/2008 14:55:03 ******/
IF NOT EXISTS (SELECT * FROM dbo.sysindexes WHERE id = OBJECT_ID(N'[dbo].[AccountsInfo]') AND name = N'IX_AccountsInfo_Accounts')
CREATE UNIQUE NONCLUSTERED INDEX [IX_AccountsInfo_Accounts] ON [dbo].[AccountsInfo]
(
[Accounts] ASC
)
GO
/****** 对象: Index [IX_AccountsInfo_GameID] 脚本日期: 01/23/2008 14:55:03 ******/
IF NOT EXISTS (SELECT * FROM dbo.sysindexes WHERE id = OBJECT_ID(N'[dbo].[AccountsInfo]') AND name = N'IX_AccountsInfo_GameID')
CREATE NONCLUSTERED INDEX [IX_AccountsInfo_GameID] ON [dbo].[AccountsInfo]
(
[GameID] ASC
)
GO
/****** 对象: Index [IX_AccountsInfo_GameLogonTimes] 脚本日期: 01/23/2008 14:55:03 ******/
IF NOT EXISTS (SELECT * FROM dbo.sysindexes WHERE id = OBJECT_ID(N'[dbo].[AccountsInfo]') AND name = N'IX_AccountsInfo_GameLogonTimes')
CREATE NONCLUSTERED INDEX [IX_AccountsInfo_GameLogonTimes] ON [dbo].[AccountsInfo]
(
[GameLogonTimes] ASC
)
GO
/****** 对象: Index [IX_AccountsInfo_LastLogonDate] 脚本日期: 01/23/2008 14:55:03 ******/
IF NOT EXISTS (SELECT * FROM dbo.sysindexes WHERE id = OBJECT_ID(N'[dbo].[AccountsInfo]') AND name = N'IX_AccountsInfo_LastLogonDate')
CREATE NONCLUSTERED INDEX [IX_AccountsInfo_LastLogonDate] ON [dbo].[AccountsInfo]
(
[LastLogonDate] ASC
)
GO
/****** 对象: Index [IX_AccountsInfo_LastLogonIP] 脚本日期: 01/23/2008 14:55:03 ******/
IF NOT EXISTS (SELECT * FROM dbo.sysindexes WHERE id = OBJECT_ID(N'[dbo].[AccountsInfo]') AND name = N'IX_AccountsInfo_LastLogonIP')
CREATE NONCLUSTERED INDEX [IX_AccountsInfo_LastLogonIP] ON [dbo].[AccountsInfo]
(
[LastLogonIP] ASC
)
GO
/****** 对象: Index [IX_AccountsInfo_MemberOrder] 脚本日期: 01/23/2008 14:55:03 ******/
IF NOT EXISTS (SELECT * FROM dbo.sysindexes WHERE id = OBJECT_ID(N'[dbo].[AccountsInfo]') AND name = N'IX_AccountsInfo_MemberOrder')
CREATE NONCLUSTERED INDEX [IX_AccountsInfo_MemberOrder] ON [dbo].[AccountsInfo]
(
[MemberOrder] ASC
)
GO
/****** 对象: Index [IX_AccountsInfo_MemberOverDate] 脚本日期: 01/23/2008 14:55:03 ******/
IF NOT EXISTS (SELECT * FROM dbo.sysindexes WHERE id = OBJECT_ID(N'[dbo].[AccountsInfo]') AND name = N'IX_AccountsInfo_MemberOverDate')
CREATE NONCLUSTERED INDEX [IX_AccountsInfo_MemberOverDate] ON [dbo].[AccountsInfo]
(
[MemberOverDate] ASC
)
GO
/****** 对象: Index [IX_AccountsInfo_RegisterDate] 脚本日期: 01/23/2008 14:55:03 ******/
IF NOT EXISTS (SELECT * FROM dbo.sysindexes WHERE id = OBJECT_ID(N'[dbo].[AccountsInfo]') AND name = N'IX_AccountsInfo_RegisterDate')
CREATE NONCLUSTERED INDEX [IX_AccountsInfo_RegisterDate] ON [dbo].[AccountsInfo]
(
[RegisterDate] ASC
)
GO
/****** 对象: Index [IX_AccountsInfo_RegisterIP] 脚本日期: 01/23/2008 14:55:03 ******/
IF NOT EXISTS (SELECT * FROM dbo.sysindexes WHERE id = OBJECT_ID(N'[dbo].[AccountsInfo]') AND name = N'IX_AccountsInfo_RegisterIP')
CREATE NONCLUSTERED INDEX [IX_AccountsInfo_RegisterIP] ON [dbo].[AccountsInfo]
(
[RegisterIP] ASC
)
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'USER',N'dbo', N'TABLE',N'AccountsInfo', N'COLUMN',N'UserID'))
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户标识' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AccountsInfo', @level2type=N'COLUMN',@level2name=N'UserID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'USER',N'dbo', N'TABLE',N'AccountsInfo', N'COLUMN',N'GameID'))
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'游戏标识' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AccountsInfo', @level2type=N'COLUMN',@level2name=N'GameID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'USER',N'dbo', N'TABLE',N'AccountsInfo', N'COLUMN',N'ProtectID'))
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'密保标识' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AccountsInfo', @level2type=N'COLUMN',@level2name=N'ProtectID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'USER',N'dbo', N'TABLE',N'AccountsInfo', N'COLUMN',N'Accounts'))
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户帐号' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AccountsInfo', @level2type=N'COLUMN',@level2name=N'Accounts'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'USER',N'dbo', N'TABLE',N'AccountsInfo', N'COLUMN',N'RegAccounts'))
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'注册帐号' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AccountsInfo', @level2type=N'COLUMN',@level2name=N'RegAccounts'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'USER',N'dbo', N'TABLE',N'AccountsInfo', N'COLUMN',N'UnderWrite'))
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'个性签名' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AccountsInfo', @level2type=N'COLUMN',@level2name=N'UnderWrite'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'USER',N'dbo', N'TABLE',N'AccountsInfo', N'COLUMN',N'LogonPass'))
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'登录密码' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AccountsInfo', @level2type=N'COLUMN',@level2name=N'LogonPass'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'USER',N'dbo', N'TABLE',N'AccountsInfo', N'COLUMN',N'InsurePass'))
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'安全密码' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AccountsInfo', @level2type=N'COLUMN',@level2name=N'InsurePass'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'USER',N'dbo', N'TABLE',N'AccountsInfo', N'COLUMN',N'SpreaderID'))
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'推荐人标识' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AccountsInfo', @level2type=N'COLUMN',@level2name=N'SpreaderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'USER',N'dbo', N'TABLE',N'AccountsInfo', N'COLUMN',N'FaceID'))
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'头像标识' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AccountsInfo', @level2type=N'COLUMN',@level2name=N'FaceID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'USER',N'dbo', N'TABLE',N'AccountsInfo', N'COLUMN',N'Experience'))
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'经验数值' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AccountsInfo', @level2type=N'COLUMN',@level2name=N'Experience'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'USER',N'dbo', N'TABLE',N'AccountsInfo', N'COLUMN',N'UserRight'))
EXEC dbo.sp_addextendedproperty @name=N'MS_Description', @value=N'用户权限' , @level0type=N'USER',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'AccountsInfo', @level2type=N'COLUMN',@level2name=N'UserRight'
GO
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -