2016年8月2日

合并查询结果与为表和字段取别名

摘要: t_book: t_booktype: 1、UNION: 数据库系统会将所有的查询结果合并到一起,然后会去掉相同的记录。 在t_booktype中加入id=6的生物类后: 2、UNION ALL:不会去掉系统记录,全部查出来。 3、为表取别名: 格式:表名 表的别名,直接写在原表后面(有空格)。 取 阅读全文

posted @ 2016-08-02 21:49 Javanumberone 阅读(518) 评论(0) 推荐(0) 编辑

MySQL子查询

摘要: 首先创建表: create table `t_pricelevel` ( `id` int , `priceLevel` int , `price` float , `description` varchar (300)); insert into `t_pricelevel` (`id`, `pr 阅读全文

posted @ 2016-08-02 21:26 Javanumberone 阅读(360) 评论(0) 推荐(0) 编辑

导航