摘要:
1.插入数据 语句: insert into 表名 (列表名) values() --若插入的数据包含了所有的字段,那么列表名可省略 示例: INSERT INTO `role`(`ID`,`ROLE_NAME`,`ROLE_DESC`) VALUES (1,'院长','管理整个学院'),(2,'总 阅读全文
posted @ 2021-08-05 23:45
功不唐捐-纯小喜
阅读(3204)
评论(0)
推荐(0)
摘要:
1.内连接 select 字段名 from 表1 inner join 表2 on 连接条件 --其中inner可以省略,可拓展到3张表以上 示例: 要求:查询员工表和部门表中员工的姓名 select sname from employee join department on employee.i 阅读全文
posted @ 2021-08-05 23:15
功不唐捐-纯小喜
阅读(2224)
评论(0)
推荐(0)
摘要:
查询语句: 1.where子句 select 查询内容 from 表名 where where后面可以接如下查询条件 比较:>, <, >=, <=, =, <>(或!=) 确定范围:between and, not between and 确定集合:in, not in 字符匹配:like, no 阅读全文
posted @ 2021-08-05 17:15
功不唐捐-纯小喜
阅读(543)
评论(0)
推荐(0)
摘要:
注意:SQL语句是不区分大小写的 1.创建表 create table 表名( 字段名 数据类型 约束, ... ) 其中,字段名和数据类型是必须要写的,而约束可以没有。 示例: create table student( sid int primary key, name varchar(20) 阅读全文
posted @ 2021-08-05 12:38
功不唐捐-纯小喜
阅读(850)
评论(0)
推荐(0)

浙公网安备 33010602011771号