In Oracle, equal is =, not equal is! = And <>
1. 1 <> 1:
It is 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.
2.1 = 1 is used to create dynamic SQL:
For example:
Lv_string = 'select tbl_name, tbl_desc from tbl_test where1 = 1' + condition;
When you select the query name 'abc ',
Condition = 'and tbl_name = ''abc ''';
However, when the user does not select a name for query, the condition is an empty string ''.
Lv_string = 'select tbl_name, tbl_desc from tbl_test where1 = 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.