摘要:
創建 sql 代码 create table a_bak as select * from a where 1=2; create table b(b1,b2,b3) as select a1,a2,a3 from a where 1=2; -- 視圖中不能用order by,但可以用group by來達到排序的目的 cre... 阅读全文
posted @ 2008-04-25 09:56 小强小工 阅读(758) 评论(0) 推荐(0)
|
|||
|
摘要:
創建 sql 代码 create table a_bak as select * from a where 1=2; create table b(b1,b2,b3) as select a1,a2,a3 from a where 1=2; -- 視圖中不能用order by,但可以用group by來達到排序的目的 cre... 阅读全文
posted @ 2008-04-25 09:56 小强小工 阅读(758) 评论(0) 推荐(0)
摘要:
UNION 指令的目的是将两个 SQL 语句的结果合并起来。从这个角度来看, UNION 跟 JOIN 有些许类似,因为这两个指令都可以由多个表格中撷取资料。 UNION 的一个限制是两个 SQL 语句所产生的栏位需要是同样的资料种类。另外,当我们用 UNION这个指令时,我们只会看到不同的资料值 (类似 Select DISTINCT)。 union只是将两个结果联结起来一起显示,并不是联结两个... 阅读全文
posted @ 2008-04-25 09:53 小强小工 阅读(3900) 评论(0) 推荐(0) |
|||