1. 1<>1 的用处:
用于只取结构不取数据的场合
例如:
create table table_temp tablespace tbs_temp as
select * from table_ori where 1<>1
建成一个与table_ori 结构相同的表table_temp,但是不要table_ori 里的数据。
(除了表结构,其它结构也同理)
2.1=1用于动态SQL
例如:
lv_string = 'select tbl_name,tbl_desc from tbl_test where 1=1 '+l_condition;
当用户选择了查询的名称'abc'时
l_condition ='and tbl_name = ''abc''';