1. 1 <> 1:
Used to retrieve only structures without data
For example:
Create Table table_temp tablespace tbs_temp
Select * From table_ori where 1 <> 1
Create a table table_temp with the same table_ori structure, but do not use data in table_ori.
(In addition to the table structure, the same applies to other structures)
2.1 = 1 for dynamic SQL
For example:
Lv_string = 'select tbl_name, tbl_desc from tbl_test where 1 = 1' + l_condition;
When you select the query name 'abc ',
Rochelle condition = 'and tbl_name = ''abc ''';
However, when the user does not select a name for query, l_condition is an empty string ''.
Lv_string = 'select tbl_name, tbl_desc from tbl_test where 1 = 1 ',
No error occurs during running, which is equivalent to no restriction on name conditions. However, if there is no 1 = 1 condition
Lv_string = 'select tbl_name, tbl_desc from tbl_test where ';
In this way, an error is reported.
From: http://topic.csdn.net/u/20110512/10/11def83d-44b1-461a-beaf-5fdfaf04890d.html