zoukankan      html  css  js  c++  java
  • 14.-1复习

    ---恢复内容开始---

    DDL(数据定义语言)、DML(数据操作语言)、DCL(数据库控制语言)

    C#语言中,用双引号(" ")表示字符串;sql中,用单引号(' ')表示字符串。

    C#语言中,判断两个变量是否相等,使用双等号(==)来判断;在数据库中,使用单等号(=)。

    C#语言中,转义符号。例如:

    “HI HELLO ""FdSF""FSDFSD "

    sql语句中,两个单引号转义一个单引号。例如:

    ‘hsgjgskhgk ''sgvhgsgj   shjhb’
    --创建数据库TestSchool
    --TblStudent学生表
    ----tSId  --学生编号
    ----     tSName  --姓名
    ----     tSGender  --性别
    ----     tSAddress  --地址
    ----     tSPhone  --电话
    ----     tSAge  --年龄
    ----     tSBirthday  --生日
    ----     tSCardId  --身份证号
    ----     tSClassId  --班级Id
    ----创建一个班级表TblClass,班级名称和班级ID
    --创建学生成绩表TblScore
    --tScoreId(成绩id,主键,自动编号)、tSId(学生编号)、tEnglish(英语成绩)、tMath(数学成绩)
    --创建老师表TblTeacher
    --tTId、tTName、tTGender、tTAge、tTSalary、tTBirthday
    
    create table TblScore
    (
      tScoreId int identity(1,1) primary key,
      tSId int not null,
      tEnglish float,
      tMath float
    ) 
    
    
    create table TblTeacher
    (
       tTId int identity(1,1) primary key,
       tTNmae nvarchar(50) not null ,
       tTGender bit,
       tAge int,
       tTSalary money,--money类型占用8个字节
       tTBirthday date
    )
    
    create table TblStudent
    (
       tSId int identity(1,1) primary key,
       tSName nvarchar(50) not null,
       tSGender bit, --或者为tSGender nchar(1  )
       tSAddress nvarchar(500),
       tSPhone varchar(50),
       tSAge int,
       tSBirthday date,
       tSCardId varchar(18),
       tSClassId int 
    )
    create table TblClass
    (
       tClassId int identity(1,1) primary key,
       tClassName nvarchar(50)
    )
  • 相关阅读:
    【BZOJ 1069】【SCOI 2007】最大土地面积 凸包+旋转卡壳
    【POJ 2187】Beauty Contest 凸包+旋转卡壳
    1056: [HAOI2008]排名系统
    1874: [BeiJing2009 WinterCamp]取石子游戏
    1055: [HAOI2008]玩具取名
    2338: [HNOI2011]数矩形
    1060: [ZJOI2007]时态同步
    1054: [HAOI2008]移动玩具
    1053: [HAOI2007]反素数ant
    1052: [HAOI2007]覆盖问题
  • 原文地址:https://www.cnblogs.com/Strugglinggirl/p/7171166.html
Copyright © 2011-2022 走看看