设为首页 加入收藏

TOP

SQLserver练习题之数据库sql文件(一)
2018-04-17 09:08:06 】 浏览:228
Tags:SQLserver 习题 数据库 sql 文件

本文用来存放SQL server 练习2的数据库,原本是sql文件来的。要还原的话,复制以下代码到sql文件中去然后执行即可。

USE [master]
GO
/****** Object:  Database [stuManage]    Script Date: 2018/4/15 23:06:28 ******/
CREATE DATABASE [stuManage]
 CONTAINMENT = NONE
 ON  PRIMARY 
( NAME = N'stuManage2', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\stuManage2.mdf' , SIZE = 4096KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB )
 LOG ON 
( NAME = N'stuManage2_log', FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\stuManage2_log.ldf' , SIZE = 5184KB , MAXSIZE = 2048GB , FILEGROWTH = 10%)
GO
ALTER DATABASE [stuManage] SET COMPATIBILITY_LEVEL = 90
GO
IF (1 = FULLTEXTSERVICEPROPERTY('IsFullTextInstalled'))
begin
EXEC [stuManage].[dbo].[sp_fulltext_database] @action = 'disable'
end
GO
ALTER DATABASE [stuManage] SET ANSI_NULL_DEFAULT OFF 
GO
ALTER DATABASE [stuManage] SET ANSI_NULLS OFF 
GO
ALTER DATABASE [stuManage] SET ANSI_PADDING OFF 
GO
ALTER DATABASE [stuManage] SET ANSI_WARNINGS OFF 
GO
ALTER DATABASE [stuManage] SET ARITHABORT OFF 
GO
ALTER DATABASE [stuManage] SET AUTO_CLOSE OFF 
GO
ALTER DATABASE [stuManage] SET AUTO_CREATE_STATISTICS ON 
GO
ALTER DATABASE [stuManage] SET AUTO_SHRINK OFF 
GO
ALTER DATABASE [stuManage] SET AUTO_UPDATE_STATISTICS ON 
GO
ALTER DATABASE [stuManage] SET CURSOR_CLOSE_ON_COMMIT OFF 
GO
ALTER DATABASE [stuManage] SET CURSOR_DEFAULT  GLOBAL 
GO
ALTER DATABASE [stuManage] SET CONCAT_NULL_YIELDS_NULL OFF 
GO
ALTER DATABASE [stuManage] SET NUMERIC_ROUNDABORT OFF 
GO
ALTER DATABASE [stuManage] SET QUOTED_IDENTIFIER OFF 
GO
ALTER DATABASE [stuManage] SET RECURSIVE_TRIGGERS OFF 
GO
ALTER DATABASE [stuManage] SET  DISABLE_BROKER 
GO
ALTER DATABASE [stuManage] SET AUTO_UPDATE_STATISTICS_ASYNC OFF 
GO
ALTER DATABASE [stuManage] SET DATE_CORRELATION_OPTIMIZATION OFF 
GO
ALTER DATABASE [stuManage] SET TRUSTWORTHY OFF 
GO
ALTER DATABASE [stuManage] SET ALLOW_SNAPSHOT_ISOLATION OFF 
GO
ALTER DATABASE [stuManage] SET PARAMETERIZATION SIMPLE 
GO
ALTER DATABASE [stuManage] SET READ_COMMITTED_SNAPSHOT OFF 
GO
ALTER DATABASE [stuManage] SET HONOR_BROKER_PRIORITY OFF 
GO
ALTER DATABASE [stuManage] SET RECOVERY FULL 
GO
ALTER DATABASE [stuManage] SET  MULTI_USER 
GO
ALTER DATABASE [stuManage] SET PAGE_VERIFY CHECKSUM  
GO
ALTER DATABASE [stuManage] SET DB_CHAINING OFF 
GO
ALTER DATABASE [stuManage] SET FILESTREAM( NON_TRANSACTED_ACCESS = OFF ) 
GO
ALTER DATABASE [stuManage] SET TARGET_RECOVERY_TIME = 0 SECONDS 
GO
EXEC sys.sp_db_vardecimal_storage_format N'stuManage', N'ON'
GO
USE [stuManage]
GO
/****** Object:  Table [dbo].[course]    Script Date: 2018/4/15 23:06:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[course](
    [cNO] [char](6) NOT NULL,
    [cName] [char](40) NOT NULL,
    [cpNO] [char](6) NULL,
 CONSTRAINT [PK_course] PRIMARY KEY CLUSTERED 
(
    [cNO] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[course_class]    Script Date: 2018/4/15 23:06:29 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[cou
编程开发网
首页 上一页 1 2 3 下一页 尾页 1/3/3
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇SQLserver数据库相关练习 下一篇一个sql语句错误引出的关于group ..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容:

array(4) { ["type"]=> int(8) ["message"]=> string(24) "Undefined variable: jobs" ["file"]=> string(32) "/mnt/wp/cppentry/do/bencandy.php" ["line"]=> int(214) }