Syntax for getting the table witout any contents

Questions by deeptipreeti

Showing Answers 1 - 27 of 27 Answers

minnu

  • Apr 11th, 2006
 

It can be 

    Desc <Table Name>;

  Was this answer useful?  Yes

srikanth

  • Apr 15th, 2006
 

  hii i didnt get ur question

  Was this answer useful?  Yes

RoulRaj

  • May 15th, 2007
 

What is the meaning of 1=2 in the WHERE clause.

Regards
Roul R.K.

  Was this answer useful?  Yes

Syntax for getting the table without any contents is


select * from <table_name> where 1=2;

In the where clause we should give a condition which never satisfies.Since 1 is never equal to 2, hence its a false condition.You can give any condition like 1 >2 or similar such conditions which is impossible to become true.

Madhu

  Was this answer useful?  Yes

hi madhu,

   You get No Rows selected if u give select * from emp where 1=2.
Its of no use. You cant kno anything about a table with the above statement.
If you want to knw abt a table give
describe <tableName> or
desc <tableName>

  Was this answer useful?  Yes

kksingh01

  • Jan 12th, 2009
 

To get the structure of any existing table, we give a false statemetnt with WHERE clause.

>select * from emp where 1=2;

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions