![]() ![]() In Oracle database, where 1=1 means true and 1=2 means false because 1 is never equal to 2 ? Hi Michael, thank you for posting your question on our discussion forum. You could use any number like 2=3 or 3=3, only thing that matters here is both numbers are same or not. Here we can write query like below:ĬREATE TABLE TABLE_B AS SELECT * FROM TABLE_A WHERE 1=2 Suppose we have to create a table (table_b) same as another table (table_a) but do not want to copy any record from table_a, only table structure will be same for both tables. Now if we want everything from table_a will be copied to table_b, write query like belowĬREATE TABLE TABLE_B AS SELECT * FROM TABLE_A WHERE 1=1 – This will create table_b same as table_a without copying records from table_a, only table description will be copied to table_b. You could use ‘where 1=1’ or ‘1=2’ in any query like SELECT COUNT(*) FROM TABLE_A WHERE 1=2 – This will copy table structure, all records from table_a to table_b.Įven you could use string also like ‘tech’ = ‘techonestop’ or ‘tech’=’tech’. ![]() If you want to add more information, please feel free to comment here. HONEY SELECT UPDATE FROM 1.1 TO 1.2 FREE.HONEY SELECT UPDATE FROM 1.1 TO 1.2 SERIES.HONEY SELECT UPDATE FROM 1.1 TO 1.2 FULL.HONEY SELECT UPDATE FROM 1.1 TO 1.2 UPGRADE. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |