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 |
why SQL server is more used to store database rather than Access
What are examples of triggers?
What is bulkcopy in sql?
What are page splits?
How is a full-text index updated?
How do you check the performance of a query and how do you optimize it?
Consider a table with 8 rows 4 rows contains value 0 and 4 rows contains value 1.Now write a single update query to make all 0's as 1 and all 1's as 0
7 Answers PMAM IT Services, TCS,
in tabase table having a column in it empname field is there which having 5 duplicate values is there i want deleted all the duplicates i want showing only one name only.
Is it possible to call a stored procedure within a stored procedure?
What is replace and stuff function in sql server?
What is the purpose of sql profiler in sql server?
Suppose i have one sql query that contains 2 minute to execute.After one weekly i am executing same query that is taking 5 minute.Why our same query is taking more time.what would be my approach to reduce execution time.Please help.
1 Answers Cognizant, HCL, Value Labs,
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)