Buy Questpond's video subscriptions on
huge discount
.
Online: 544
Home
Articles
Interviews
Forums
For Beginners
Popular Questions
ITIL Career Advice
PMP Career Advice
Career Advices
Codes
Videos
ASP.NET
ASP.NET MVC
Android Intel XDK
Sql Server
AngularJS
Bootstrap
Backbone.JS
MongoDB
LESS (CSS)
jQuery
WPF
WWF
SSIS
LightSwitch
Tutorials
News
ASP.NET MVC
|
Be Interview Ready
|
Top Performers
|
DNF MVP
|
Top Posts
|
Winners
|
Subscribe
|
Catalogs
Welcome Guest !
Register
Login
Home
>
Interviews
>
Sql Server
>
Loading ...
Which of the following queries generates an error when executed?
DECLARE @x VARCHAR(10), @y VARCHAR(10)
SET @y = ''
SELECT @x/0 -- query 1
SELECT @x/2 -- query 2
SELECT @y/0 -- query 3
SELECT @y/2 -- query 4
Posted by
Virendradugar
on 9/15/2009 | Category:
Sql Server Interview questions
| Views: 7267
Post
|
Interview FAQs
|
Exclusive Questions
|
Interview Home
Answer:
Answer: 3
Explanation: Queries 1 and 2 return NULL since @x is undefined. Query 4 returns 0 since the string '' is implicitly converted to 0. Query 3 returns a divide by 0 error.
Asked In:
Many Interviews |
Alert Moderator
Bookmark It
< Previous :
What type of language is the SELECT command in SQL ...
Next > :
Can we execute any web site without the web.config ...
Comments or Responses
Login to post response
More Interview Questions by Virendradugar
Can we execute any web site without the web.config file?
What's the difference between Codebehind="MyCode.aspx.cs" an ...
How do you turn off cookies for one page in your site?
How do you create a permanent cookie?
A software engineer has the capability of thinking 100 lines of code i ...
Which method of HTTP Handler gets invoked when request is received?
What if Some one types the URL of web.config file in the browser?
What is wrong with this code? Server.transfer("Default.HTML&qu ...
Latest Interview Questions
What are the expiration policies for Cached objects?
try { Response.Write("Try Block:"); ...
What is the name of class from which web pages are inherited?
An array is fixed length type that can store group of objects.
Webservices support data reader.
Can you store multiple datatypes in an Array?
Which keyword is used to prevent one class from being inherited by ano ...
In this Sample Code which catch block will be executed? try { i ...
More ...