使用SQL语句创建学生实验数据库(stuexpm),在数据库stuepxm中,编写和调试创建表,查看表,修改表,删除表的代码.

小笨蛋都会的代码教程来啦

#课本P78实验4.2-3
#(1)创建数据库stuexpm
create database stuexpm;


#(2)创建studentinfo表,显示studentinfo表的基本结构 
use stuexpm;
create table studentinfo
(
 StudentID varchar(6) not null primary key comment '学号',
    Name char(8) not null comment '姓名',
    Sex char(2) not null default '男' comment '性别',
    Birthdat date not null comment '出生日期',
    Speciality Varchar(12) null comment '专业',
    Address varchar(20) null comment  '家庭地址'
);
desc studentinfo;
show databases;
show create table studentinfo;

 

 

#(3)由studentinfo表使用复制方式创建studenti

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值