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)
    )
  • 相关阅读:
    ajax 请求登录超时跳转登录页的示例代码
    [WPF]实现密码框的密码绑定
    Linq系列(5)——表达式树之案例应用
    idea设置内存大小
    idea右下角显示使用内存情况
    idea打开Run Dashboard
    java的byte[]与String相互转换
    java有包名的调用没有包名的类,用反射
    【转】查看电脑显卡型号及显卡性能
    idea关闭sonarLint自动扫描
  • 原文地址:https://www.cnblogs.com/Strugglinggirl/p/7171166.html
Copyright © 2011-2022 走看看