10 2018 档案
摘要:SQL模糊查询,使用like比较关键字,加上SQL里的通配符: 语法:select * from 表 where 字段 Like 条件; 1、LIKE'Al%' 将搜索以字母 Al 开头的所有字符串(如 Alan)。 2、LIKE'%cast' 将搜索以字母 cast 结尾的所有字符串(如 anyc
阅读全文
摘要:1、等值连接查询:查询的结果为两个表匹配到的数据 语法:select * from 表1,表2 where 条件 and 条件; 例子:select * from 表1,表2,表3, where 表1.字段1 = 表2.字段1 and 表2.字段2 = 表3.字段2 PS:where 后面支持多种运
阅读全文
摘要:~~~~~~~MySQL基础命令 show database 查看数据库有哪些 use students 使用哪个数据库 show tables 展示数据库中的表 select * from students; 从students表中查看所有的值 insert into students (stud
阅读全文