zoukankan      html  css  js  c++  java
  • 数据表添加

    mysql> create table student(
    -> sno varchar(20) not null,
    -> sname varchar(20) not null,
    -> ssex varchar(20) not null,
    -> sbirthday datetime,
    -> class varchar(20),
    -> primary key(sno));
    Query OK, 0 rows affected

    mysql> create table course(
    -> cno varchar(20) not null,
    -> cname varchar(20) not null,
    -> tno varchar(20) not null,
    -> primary key(cno));
    Query OK, 0 rows affected

    mysql> create table score(
    -> id int auto_increment,
    -> sno varchar(20) not null,
    -> cno varchar(20) not null,
    -> degree decimal(4,1),
    -> primary key(id));
    Query OK, 0 rows affected

    mysql> create table teacher(
    -> tno varchar(20) not null,
    -> tname varchar(20) not null,
    -> tsex varchar(20) not null,
    -> tbirthday datetime,
    -> prof varchar(20),
    -> depart varchar(20) not null,
    -> primary key(tno));
    Query OK, 0 rows affected

    mysql> insert into student(sno,sname,ssex,sbirthday,class) values('108','曾华','男','1977-09-01','95033'),('105','匡明','男','1975-10-02','95031'),('107','王丽','女','1976-01-23','95033'),('101','李军','男','1976-02-20','95033'),('109','王芳','女','1975-02-10','95031'),('103','陆君','男','1974-06-03','95031');
    Query OK, 6 rows affected
    Records: 6 Duplicates: 0 Warnings: 0

  • 相关阅读:
    如何在Linux下的C++文件使用GDB调试
    21天学通C++(C++程序的组成部分)
    嵌入式Linux应用程序开发
    项目部署的问题
    未解决
    报错
    随笔
    逆向工程出现的错误1
    jpa学习
    springmvc整合mybaits
  • 原文地址:https://www.cnblogs.com/mark645524126/p/13441172.html
Copyright © 2011-2022 走看看