zoukankan      html  css  js  c++  java
  • 1.数据库和表的创建

    数据库的创建

    create database YGGL2
    on(
    name="YGGL2",
    filename="C:Program FilesMicrosoft SQL ServerMSSQL11.WANGXUELIANGMSSQLDATAYGGL2.mdf",
    size=10mb,
    maxsize=50mb,
    filegrowth=5%
    )
    log on(
    name="YGGL_log2",
    filename="C:Program FilesMicrosoft SQL ServerMSSQL11.WANGXUELIANGMSSQLDATAYGGL_log2.ldf",
    size=2mb,
    maxsize=5mb,
    filegrowth=1mb
    )

    表的创建

    create table Employees
    (
    EmpID char(6) not null primary key,
    EmpName char(10) not null,
    EmpEdu char(4) not null,
    EmpBir date not null,
    EmpSex bit not null default 0,
    WorkYear tinyint,
    Addres varchar(40),
    PhoneNum char(12),
    DepID char(3) not null
    )
    
    --创建部门表
    create table  Departments
    (
    DepID char(3) not null primary key,
    DepName char(20) not null,
    Note varchar(100),
    )
    
    --创建工资表
    create table  Salary
    (
    EmpID char(6) not null primary key,
    InCome float not null,
    OntCome float not null
    )

    临时表的创建

    --创建临时表
    create table #temp
    (
    EmpID int not null primary key,
    EmpAdd varchar(20)
    )


  • 相关阅读:
    Linux系统配置静态ip
    爬虫之如何找js入口(一)
    asyncio动态添加任务
    关于python导包问题
    python动态添加属性
    requests模块
    反selenium关键字
    PIL模块
    openxlsx模块
    CSV
  • 原文地址:https://www.cnblogs.com/wangxueliang/p/9346515.html
Copyright © 2011-2022 走看看