摘要: select *from 表名,表名 会输出这两个表的笛卡尔积 select *from 表名 限制条件 表名不能在同一条指令中反复使用,所以应当起别名,如表名 别名, 表名 别名; 可以自身连接查询 在select语句后面加两个相同的表 外连接查询 用inner join,需要加on select 阅读全文
posted @ 2024-11-19 23:52 lalalandla 阅读(16) 评论(0) 推荐(0)
摘要: 多重条件查询 select*from 表名 where 列名 条件 (如like‘ ’) 连接词(and ,or等)条件 排序查询 select * from 表名 order by 列名 asc|desc,列名 asc|desc;(正序|倒序) 聚集函数(一般用作统计) count([distin 阅读全文
posted @ 2024-11-19 01:03 lalalandla 阅读(18) 评论(0) 推荐(0)