数据库一对一实例.docxVIP

  • 55
  • 0
  • 约1.67千字
  • 约 3页
  • 2021-07-13 发布于陕西
  • 举报
数据库一对一实例 数据库一对一实例 drop database if exists tt; create database tt; drop table if exists tb_computer; create table tb_computer( idintauto_increment primary key, namevarchar(50) drop table if exists tb_student; create table tb_student( idintauto_increment primary key, namevarchar(50) , c_idint UNIQUE -- 修改外键 alter table tb_student ADD CONSTRAINT fk_student_computer FOREIGN KEY(c_id) references tb_computer(id) ; -- 添加索引 create index indexfor_tb_student on tb_student(c_id); drop database if exists tt; create database tt; dr

您可能关注的文档

文档评论(0)

1亿VIP精品文档

相关文档