what is the out put of below queries?
a. select * from Emp where null = null;
b. select * from Emp where 1=1;
Answers were Sorted based on User's Feedback
Answer / poonam
First Query : will return all columns name without any data.
Second Query :will display all the records which are available in the table.bez Select* from emp where 1=1; the condition is true.
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / nitin yadav(nitin.yadav.india@
u can not compare two nulls
null means nothing.so
ANS 1:no row
ANS 2:All row (because of 1=1 is always true for all rows)
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / rohit
in first case it would response and it will show error and
in second case it will show object belonging to first row
and column
| Is This Answer Correct ? | 4 Yes | 29 No |
i need some interview questions on sql server developer plz any onee send some links.
What is the full form of ddl?
Repair mdf file
What is normalization? Explain different forms of normalization?
How to check what was the last restore transaction LSN in Log shipping or Mirroring? when we don't have a Monitor or witness server.
What do you mean by tablesample?
Can XML be used to access data?
Difference between: - Delete & Truncate - Table & View - Constraints & Triggers
What is a trigger and its types?
Tell me what do you mean by an execution plan? Why is it used? How would you view it?
How to read 2nd highest sal from EMP table?
What is full form of XP ?
42 Answers Cap Gemini, Infosys, Microsoft, Oracle, Reliance,
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)