exec sp_dboption N'Student', N'autoclose', N'false'
GO
exec sp_dboption N'Student', N'bulkcopy', N'false'
GO
exec sp_dboption N'Student', N'trunc. log', N'false'
GO
exec sp_dboption N'Student', N'torn page detection', N'true'
GO
exec sp_dboption N'Student', N'read only', N'false'
GO
exec sp_dboption N'Student', N'dbo use', N'false'
GO
exec sp_dboption N'Student', N'single', N'false'
GO
exec sp_dboption N'Student', N'autoshrink', N'false'
GO
exec sp_dboption N'Student', N'ANSI null default', N'false'
GO
exec sp_dboption N'Student', N'recursive triggers', N'false'
GO
exec sp_dboption N'Student', N'ANSI nulls', N'false'
GO
exec sp_dboption N'Student', N'concat null yields null', N'false'
GO
exec sp_dboption N'Student', N'cursor close on commit', N'false'
GO
exec sp_dboption N'Student', N'default to local cursor', N'false'
GO
exec sp_dboption N'Student', N'quoted identifier', N'false'
GO
exec sp_dboption N'Student', N'ANSI warnings', N'false'
GO
exec sp_dboption N'Student', N'auto create statistics', N'true'
GO
exec sp_dboption N'Student', N'auto update statistics', N'true'
GO
use [Student]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[S_Course]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[S_Course]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[S_Cs]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[S_Cs]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[S_Department]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[S_Department]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[S_Grade]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[S_Grade]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[S_User]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[S_User]
GO
CREATE TABLE [dbo].[S_Course] (
[Id] [int] IDENTITY (1, 1) NOT NULL ,
[Name] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY]
GO
/****** Object: Database Student Script Date: 2006-4-13 13:45:34 ******/
IF EXISTS (SELECT name FROM master.dbo.sysdatabases WHERE name = N'Student')
DROP DATABASE [Student]
GO