学生数据库建立的开始阶段

来源:互联网 发布:mac pdf 导出图片 编辑:程序博客网 时间:2024/06/11 03:48

 create database system;

 use system;

 create table a
    -> (sno char(10) primary key,
    -> sn char(20),
    -> sa int,
    -> ss char(10),
    -> sd char(10));

 create table c
    -> (cno char(10) primary key,
    -> cn char(30),
    -> pcno char(10));

 create table sc
    -> (sno char(10),
    -> cno char(10),
    -> g int);

 create table unpw
    -> (un char(10) primary key,
    -> pw char(10),
    -> qx int);

 insert into unpw value('admin',123456,0),('student',654321,1);