Download
100% FREE
Office Document APIs for .NET
Online: 825
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 ...
What does this return ?
declare @adress varchar = 'India'
select @adress
Posted by
Mcadeepuraj
on 5/4/2011 | Category:
Sql Server Interview questions
| Views: 6870 |
Points: 40
Post
|
Interview FAQs
|
Exclusive Questions
|
Interview Home
Select from following answers:
india
I
gives Error
no error
All Above
If we use varchar with no size it return only size of 1
Show Correct Answer
Source:
MIND Infotech Interview |
Asked In:
Interviews |
Alert Moderator
Bookmark It
< Previous :
what are the different types of storage in HTML 5?
Next > :
sql statement which returns all columns of table w ...
Comments or Responses
Posted by:
Kishork80
on: 5/5/2011 |
Points: 10
good observation
Posted by:
Lakhwinder.ghuman
on: 5/6/2011 |
Points: 10
The result would be I bcoz at time of declaration the size is not specified so by default it will save 1 character.
Posted by:
Shoeb2222
on: 6/22/2011 |
Points: 10
When I am trying to run the above two statement in SQL server 2008, it is throwing below error.
Msg 139, Level 15, State 1, Line 0
Cannot assign a default value to a local variable.
Msg 137, Level 15, State 2, Line 2
Must declare the scalar variable "@adress".
Thanks
Shoeb
Posted by:
Mcadeepuraj
on: 6/22/2011 |
Points: 10
in sql 2008, it does not give error, may be you used previous version.
Login to post response
More Interview Questions by Mcadeepuraj
sql statement which returns all columns of table with no row(assuming ...
For execution of DML statement in a view, view need to contain ?
Latest Interview Questions
Is it possible to get the Registry values through C#.net , if so what ...
Which data-related class do you use to help prevent SQL injection atta ...
How can a function accepts variable mumber of arguments in C ?
What is BSON ?
what is Windows Process Activation Service ?
Difference Json Arrary Vs Json Object ?
What is the difference between Session.Abandon() and Session.Clear()?
A theme can contain how many Default and Named skin for each control ?
More ...