Why use "where 1=2" on a SQL CREATE TABLE syntax? -


create table empl_demo select * employees 1=2; 

i read statement somewhere on internet couldn't understand where 1=2.

will please, explain this?

this type of command used copy structure of 1 table another. in case, empl_demo have same column structure of employees, except keys or constraints.

the 1=2 evaluates false prevents copying of rows.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -