摘要: 约束 非空约束 外键约束 drop table if exists emp; drop table if exists dept; -- 部门表 create table dept( id int primary key auto_increment, dep_name varchar(20), a 阅读全文
posted @ 2022-07-06 21:36 还有什么值得拥有 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 基础查询 1 查询表的所有数据 select * from 表名; select * from stu; 2 查询指定字段的数据 select 字段列表 from 表名 select name,age from stu; 3 起别名 As : as 也可以省略 select name,age as 阅读全文
posted @ 2022-07-06 00:09 还有什么值得拥有 阅读(76) 评论(0) 推荐(0) 编辑