📄 spos_schema.sql
字号:
/******************************************************************************
** File: spos_Schema.sql
** Name: Physical Database Schema SQL Script
** Desc: This script will create the spos database schema
**
** Date: 1/1/2003
**
*******************************************************************************/
USE master;
-- create the database
IF NOT EXISTS (SELECT dbid FROM sysdatabases WHERE name = 'spos')
CREATE DATABASE spos;
GO
-------------------------------------------------------------------------------
--
-- Database Tables
--
-------------------------------------------------------------------------------
-- switch to the spos database
use [spos]
GO
/****** Object: Table [dbo].[StuZZ_His_Pay] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[StuZZ_His_Pay]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[StuZZ_His_Pay]
GO
/****** Object: Table [dbo].[StuZZ_params] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[StuZZ_params]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[StuZZ_params]
GO
/****** Object: Table [dbo].[Stu_Card_Money] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Stu_Card_Money]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Stu_Card_Money]
GO
/****** Object: Table [dbo].[Stu_Money_Set] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Stu_Money_Set]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Stu_Money_Set]
GO
/****** Object: Table [dbo].[accident] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[accident]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[accident]
GO
/****** Object: Table [dbo].[book] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[book]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[book]
GO
/****** Object: Table [dbo].[borrow_tools] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[borrow_tools]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[borrow_tools]
GO
/****** Object: Table [dbo].[card_fee_info] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[card_fee_info]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[card_fee_info]
GO
/****** Object: Table [dbo].[card_fee_info_cancel] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[card_fee_info_cancel]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[card_fee_info_cancel]
GO
/****** Object: Table [dbo].[class] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[class]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[class]
GO
/****** Object: Table [dbo].[class_assets] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[class_assets]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[class_assets]
GO
/****** Object: Table [dbo].[class_move] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[class_move]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[class_move]
GO
/****** Object: Table [dbo].[class_pic] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[class_pic]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[class_pic]
GO
/****** Object: Table [dbo].[cookbook] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[cookbook]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[cookbook]
GO
/****** Object: Table [dbo].[delicatessen] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[delicatessen]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[delicatessen]
GO
/****** Object: Table [dbo].[foodconsume] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[foodconsume]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[foodconsume]
GO
/****** Object: Table [dbo].[gg_admin] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gg_admin]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[gg_admin]
GO
/****** Object: Table [dbo].[gg_bbs] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gg_bbs]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[gg_bbs]
GO
/****** Object: Table [dbo].[gg_bbs_board] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gg_bbs_board]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[gg_bbs_board]
GO
/****** Object: Table [dbo].[gg_bbs_user] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gg_bbs_user]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[gg_bbs_user]
GO
/****** Object: Table [dbo].[gg_guestbook] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gg_guestbook]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[gg_guestbook]
GO
/****** Object: Table [dbo].[gg_ybqh] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gg_ybqh]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[gg_ybqh]
GO
/****** Object: Table [dbo].[gr_address] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gr_address]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[gr_address]
GO
/****** Object: Table [dbo].[gr_bq] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gr_bq]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[gr_bq]
GO
/****** Object: Table [dbo].[gr_calendar] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[gr_calendar]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[gr_calendar]
GO
/****** Object: Table [dbo].[health] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[health]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[health]
GO
/****** Object: Table [dbo].[illness] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[illness]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[illness]
GO
/****** Object: Table [dbo].[intercalate] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[intercalate]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[intercalate]
GO
/****** Object: Table [dbo].[move] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[move]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[move]
GO
/****** Object: Table [dbo].[multimedia] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[multimedia]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[multimedia]
GO
/****** Object: Table [dbo].[note] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[note]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[note]
GO
/****** Object: Table [dbo].[online] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[online]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[online]
GO
/****** Object: Table [dbo].[parent_idea] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[parent_idea]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[parent_idea]
GO
/****** Object: Table [dbo].[parenttemp] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[parenttemp]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[parenttemp]
GO
/****** Object: Table [dbo].[recruit] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[recruit]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[recruit]
GO
/****** Object: Table [dbo].[register_money] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[register_money]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[register_money]
GO
/****** Object: Table [dbo].[statistic] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[statistic]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[statistic]
GO
/****** Object: Table [dbo].[stu_his_pay] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[stu_his_pay]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[stu_his_pay]
GO
/****** Object: Table [dbo].[student] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[student]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[student]
GO
/****** Object: Table [dbo].[student_base] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[student_base]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[student_base]
GO
/****** Object: Table [dbo].[student_fee_info] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[student_fee_info]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[student_fee_info]
GO
/****** Object: Table [dbo].[student_fee_info_cancel] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[student_fee_info_cancel]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[student_fee_info_cancel]
GO
/****** Object: Table [dbo].[student_fee_set] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[student_fee_set]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[student_fee_set]
GO
/****** Object: Table [dbo].[student_parents] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[student_parents]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[student_parents]
GO
/****** Object: Table [dbo].[student_pic] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[student_pic]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[student_pic]
GO
/****** Object: Table [dbo].[student_quit] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[student_quit]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[student_quit]
GO
/****** Object: Table [dbo].[student_register] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[student_register]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[student_register]
GO
/****** Object: Table [dbo].[student_temp] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[student_temp]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[student_temp]
GO
/****** Object: Table [dbo].[student_time] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[student_time]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[student_time]
GO
/****** Object: Table [dbo].[study_info] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[study_info]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[study_info]
GO
/****** Object: Table [dbo].[systemslog] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[systemslog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[systemslog]
GO
/****** Object: Table [dbo].[teach_book] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[teach_book]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[teach_book]
GO
/****** Object: Table [dbo].[teach_tools] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[teach_tools]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[teach_tools]
GO
/****** Object: Table [dbo].[teacher_base] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[teacher_base]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[teacher_base]
GO
/****** Object: Table [dbo].[teacher_info] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[teacher_info]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[teacher_info]
GO
/****** Object: Table [dbo].[teacher_pic] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[teacher_pic]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[teacher_pic]
GO
/****** Object: Table [dbo].[term] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[term]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[term]
GO
/****** Object: Table [dbo].[users] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[users]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[users]
GO
/****** Object: Table [dbo].[work] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[work]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[work]
GO
/****** Object: Table [dbo].[xgroup] Script Date: 2003-4-2 11:36:10 ******/
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[xgroup]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[xgroup]
GO
/****** Object: Login TIGER\Administrator Script Date: 2003-4-2 11:36:07 ******/
if not exists (select * from master.dbo.syslogins where loginname = N'TIGER\Administrator')
exec sp_grantlogin N'TIGER\Administrator'
exec sp_defaultdb N'TIGER\Administrator', N'master'
exec sp_defaultlanguage N'TIGER\Administrator', N'简体中文'
GO
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -