SQL Server Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 261 Page Views: 

What will be the result of the following query ? Explain your answer. create table tempo (sno INT, item_code nvarchar(2)) ; insert into tempo select 1, '0' UNION select 2, '11' UNION select 3, '12' UNION select 4,'0' UNION select 5,'0' update t



Posted By: Avi Date: 1 October 2010 11:38:07 AM
 Answer:

The given query will result inot 3 rows. Sno item_code 1 4 5 This is because int blank '' in SQL is equal to 0.


Posted By: avibtech


Date: 1 October 2010 11:38:07 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image LqLKpa
Related Questions
SQL Server : Which Port is assigned to run SQL Server? Can the Default port be changed?

Which Port is assigned to run SQL Server? Can the Default port be changed?

1433 is the TCP/IP port which is required to run SQL Server . Yes, default port can be changed for ....
Category: SQL Server Date: 10/1/2010 10:54:06 AM
SQL Server : What is the maximum length of a varchar field in SQL Server?

What is the maximum length of a varchar field in SQL Server?

Variable-length data with a maximum of 8,000 characters.
Category: SQL Server Date: 10/30/2009 7:51:03 AM
SQL Server : What authentication mechanisms does Microsoft SQL Server support?

What authentication mechanisms does Microsoft SQL Server support?

SQL Server supports following two type of authentication mechanisms: 1) Windows Authentication (via....
Category: SQL Server Date: 10/15/2009 4:43:44 AM
SQL Server : What is the difference between UNION and UNION ALL Statements?

What is the difference between UNION and UNION ALL Statements?

UNION command selects distinct and related information from two tables while UNION ALL selects all t....
Category: SQL Server Date: 10/7/2009 3:19:40 AM
SQL Server : What is the difference between VARCHAR and NVARCHAR type?

What is the difference between VARCHAR and NVARCHAR type?

VARCHAR is a variable length string of ASCII characters while NVARCHAR is a variable length string o....
Category: SQL Server Date: 10/7/2009 3:09:18 AM