what is the output of select * from emp where null=null &
select * from emp where 1=1

Answers were Sorted based on User's Feedback



what is the output of select * from emp where null=null & select * from emp where 1=1..

Answer / anitha

select * from emp where null=null: will not return any rows
in the table since two null values are not always same.

select * from emp where 1=1 : will return all the rows in
the table because 1 is always equal to 1.

Is This Answer Correct ?    36 Yes 1 No

what is the output of select * from emp where null=null & select * from emp where 1=1..

Answer / anee desai

first command will give no records whereas 2nd command will
provide all records as 1 is equal to one.it is similar to
select * from emp;.if 2=2 will also provide the same
result.it makes no sense in writing 1=1;

Is This Answer Correct ?    10 Yes 1 No

what is the output of select * from emp where null=null & select * from emp where 1=1..

Answer / shree

first command will give no records whereas 2nd command will
provide all records as 1 is equal to one.it is similar to
select * from emp;.

Is This Answer Correct ?    3 Yes 1 No

what is the output of select * from emp where null=null & select * from emp where 1=1..

Answer / raj

Null=Null returns no row but 1=1 returns entire row of the
table.

Is This Answer Correct ?    2 Yes 0 No

what is the output of select * from emp where null=null & select * from emp where 1=1..

Answer / samir kumar sahoo

select*from emp where null=null;

this command will not return any record bcoz the
condition null=null false as two null values are not equal.


select*from emp where 1=1;

will return all the records present in the table emp as
the condition 1=1 is always true.

Is This Answer Correct ?    2 Yes 0 No

what is the output of select * from emp where null=null & select * from emp where 1=1..

Answer / kumar

Really Good Answer Anitha Madam.

By
Kumar.T

Is This Answer Correct ?    3 Yes 2 No

what is the output of select * from emp where null=null & select * from emp where 1=1..

Answer / chandana

NULL = NULL ...NOT TRUE
NO ROWS RETURNED

1=1 ...TRUE
ALL ROWS RETURNED

1=2....NOT TRUE
NO ROWS RETURNED

2=2,3==3 AND SO ON WILL RETURN ALL ROWS FROM A TABLE

Is This Answer Correct ?    1 Yes 0 No

what is the output of select * from emp where null=null & select * from emp where 1=1..

Answer / bhavish

1.statament "no rows select"
2.statament "the 14 rows displayed
why because the true condition and null values are different

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Oracle General Interview Questions

How to test null values?

0 Answers  


Design database draw er diagram for a certain scenario ?

0 Answers   Keane India Ltd, TATA,


Difference between sub query and nested query ?

19 Answers   Keane India Ltd, TCS,


What are the different pseudo commands? Explain in general?

0 Answers  


how to clone 9i Database on to 10g Database.

0 Answers  






two tables are there emp(eno,ename,sal,deptno),dept(deptno,dname).how form the query in deptno,ename,max(sal)

2 Answers  


How to use "out" parameter properly?

0 Answers  


How to assign values to variables?

0 Answers  


Using the relations and the rules set out in the notes under each relation, write table create statements for the relations EMPLOYEE, FIRE and DESPATCH. You should aim to provide each constraint with a formal name, for example table_column_pk.

0 Answers   Wipro,


What is the best way to do multi-row insert in oracle?

0 Answers  


Can we use bind variables in oracle stored procedure?

0 Answers  


when a grant option is encountered for a table EMP to a peer sitting beside you who has already having the table of that name (EMP), then what is the result?

2 Answers  


Categories
  • Oracle General Interview Questions Oracle General (1789)
  • Oracle DBA (Database Administration) Interview Questions Oracle DBA (Database Administration) (261)
  • Oracle Call Interface (OCI) Interview Questions Oracle Call Interface (OCI) (10)
  • Oracle Architecture Interview Questions Oracle Architecture (90)
  • Oracle Security Interview Questions Oracle Security (38)
  • Oracle Forms Reports Interview Questions Oracle Forms Reports (510)
  • Oracle Data Integrator (ODI) Interview Questions Oracle Data Integrator (ODI) (120)
  • Oracle ETL Interview Questions Oracle ETL (15)
  • Oracle RAC Interview Questions Oracle RAC (93)
  • Oracle D2K Interview Questions Oracle D2K (72)
  • Oracle AllOther Interview Questions Oracle AllOther (241)