Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

Answers were Sorted based on User's Feedback



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

Answer / ravi148

it retrives on coulmn names ie., does not show any records..

Is This Answer Correct ?    33 Yes 8 No

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

Answer / 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

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

Answer / arun

Since we are using SELECT statement for this query,
We can view only the structure of the table. where as if we
use the create query we can copy the structure of the table.

Is This Answer Correct ?    24 Yes 6 No

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

Answer / anfal

Hi
When i tried the below query in oracle9i it says no rows
selected. could you please let us know in which version of
Oracle u tried this query.
SQL> select * from emp where 1=2;
no rows selected

Is This Answer Correct ?    17 Yes 2 No

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

Answer / ganesh

for sure it will display no rows selected
coz for select * from emp give all and because of the where
clause 1=2.......no point in time 1 is eual to 2 or 2 is
equal to 1....so it returns no row.

eg 1=2 ----give no rows
1=1 ---gives all rows
come out of oracle and think as simple logic (is 1=2)....if
yes true else false.....similar of oracle also

Is This Answer Correct ?    12 Yes 2 No

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

Answer / vijay amresh

Hi
When i tried the below query in oracle9i it says no rows

SELET *
FROM EMP
WHERE 1=2;

gives the query for 1=2, it is false so There is no row.

But if it runs for 1=1, then all rows are selected.

Is This Answer Correct ?    9 Yes 1 No

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

Answer / suresh kumar somayajula

Hi Anfal,

Try the following Query.

SQL> CREATE TABLE EMP_NEW
AS
SELET *
FROM EMP
WHERE 1=2;
Table Created

SQL> SELECT * FROM EMP_NEW
no rows selected.

SQL> DESC EMP_NEW;
Structure will be displayed.

Please correct me if any mistakes.

Thank you,
Suresh

Is This Answer Correct ?    11 Yes 4 No

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

Answer / vikas patil

It is used only for condition checking
for example select * From emp Where 1=2;
it will return 0 rows
select * From emp Where 1=1;
it will return all rows
select * From emp Where 1<2;
it will return all rows
select * From emp Where 1<=1;
it will return all rows

Is This Answer Correct ?    2 Yes 0 No

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

Answer / prasad237

it will display all the columns

Is This Answer Correct ?    0 Yes 0 No

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

Answer / sekhar

null value

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Manual Testing Interview Questions

What are the possible testcases for online mobile recharge? For eg, in a web application like paytm.

1 Answers  


What is decision table testing?

0 Answers  


What is Tracibility matrix?How we can use in real time application?

3 Answers  


How will you validate the functionality of the Test cases, if there is no business requirement document or user requirement document as such…

4 Answers   Virtusa,


what should be tested when credit card is used as payment option in ecommerce project?can anyone tell me in detail what to test n how to test when credit card is involved in web application?

0 Answers  


what is test case? how to use use cases in test case preparations akila4you@gmail.com

7 Answers  


Wht is the Test Driver used in Integration Testing. Anybody can expalin in Detail. Thanks in advance.

6 Answers   TCS,


What will be the QA roles and responsibilities in Health care stream like BCBS,can someone please explain me any example project regarding health care services in web-based application?

0 Answers  


What r the features,u take care in prototype testing?

0 Answers   Satyam,


i have worked in 11 month duration project. interviewed person asked me for wat purpose you worked in that project and wat you worked. you worked for a long time in one project. its loss for the company you worked.

4 Answers   CTS,


what is testing methodology

3 Answers   Wipro,


1] Test Management Tool ? 2] What is tracebility Matrix? 3] What is RTM ? 4] What Is Functional testing 5] What is Regration Testing and Sanity Testing 6] Diff in Sanity and Functional Tetsing 7] Integration Tetsing 8] Diff in Primary Key and Unique Key -Should pass primary Key as null 9] What is composit Key 10] Defect Management tool in detail 11] What is Seviarity and Priority 12] Composite Key

2 Answers   HCL,


Categories