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

  • 相关阅读:
    安卓adb
    图数据库学习
    分布式架构演进
    多活架构
    异地多活
    分布式CRDT
    技术架构的战略和战术原则
    分布式金融架构课笔记
    使用jackson进行json序列化时进行敏感字段脱敏(加密)或者忽略
    读书笔记《演进式架构》
  • 原文地址:https://www.cnblogs.com/mark645524126/p/13441172.html
Copyright © 2011-2022 走看看