what is the output of the query select * from emp where 1=2

Answer Posted / mithun

hi everyone ,
its a trick to copy the structure of the table wthout the
data .
1 SQL> create table employee1
2 as select * from emp
3 where 1=2;

the compiler will look for the statment 2 first
then it will come to the 3 line to check the condition ,when
it gets a 0 [means false] at that time only the table
structure was there in the buffer ; now it will return to
the 1st statement to create a table with the structure only .
so it will return only the structure of the table .
similarly when this
SELET *
FROM EMP
WHERE 1=2;
querry is executed as per the false conditon it will only
show no rows selected .
hope you get the answer .
have a nice time for any more assistance you can mail me to
ermithun.c@gmail.com

Is This Answer Correct ?    27 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Q) Create Preffered customer: As a customer when i purchase more than $5000 in goods since my first purchase, I become a preffered customer so that i can receive the benefits associated with that status.

1925


What is the Testing strategy for testing client server applications/products?

1832


1.what kind of testing have you done ?

2376


What are the RBI rules has to follow by a bank for online precesseing. ?

1727


Explain compatibility testing with an example.

660






How to test an application if it was already developed and it is in the state of changing the functionality according to the customer requirement How to start testing in this situation. I got an application to test.It is a desktop application.It is still developing and started 8 months back.how can i start to test this application? Is it the right way to test it in "Random testing"? or writing the testcases from page one and executing them.i have an another responsibility that is I have to automate that application. can anyone tell me what is the process to test this application.

1555


What are the different available models of sdlc?

674


what s test block ratio? please any one answer me..

1827


what is the critical defect in telecom domain?help me out from this prob its very urgent

3105


tell me brief about your project? please help me how to explain the project what is the flow? my current project is ERP domain web based application. please help me

1548


How to write test cases for nevigating menus? Ex. Course -Topics -Subtopics

1688


What is QCM?

1785


What is defect validity ratio?

6774


Can anybody write the test cases for the following scenario. I want to create District. for that, District Code field, District Name field, Reset button, Submit button, Back button are there in the screen. whenever we enter District Code & District Name in the related fields, by clicking on Submit button, District should be created. By clicking on Reset button, all fieds should be cleared. By clicking on Back button, user should navigate to home page. Can you write the test cases for the scenario. I want to know the test case format for the scenario. what procedure is the best. tahnks in advance...

3641


What is test management?

1438