摘要:
where 1=1 最近看到很多sql里用到where 1=1,原来觉得这没用嘛,但是又想到如果没用为什么要写呢?于是在网上 查了查,在这里就浅谈一下: 1=1 永真, 1<>1 永假。 1<>1 的用处: 用于只取结构不取数据的场合 例如: create table table_temp tablespace tbs_temp as select * from table_ori where 1<>1 建成一个与table_ori 结构相同的表table_temp,但是不要table_ori 里的数据。(除了表结构,其它结 构也同理) 1=1的用处 用于动 阅读全文
posted @ 2013-05-03 17:25
天殇月痕
阅读(167)
评论(0)
推荐(0)

浙公网安备 33010602011771号