Buy Questpond's video subscriptions on
huge discount
.
Online: 1482
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
Sql Server Interview Questions and Answers (1758) - Page 83
Latest and authentic Interview questions. You can also
post an interview question
and
win monthly prizes
as well as gain community
credit points
.
1758 records found.
Post
|
Interview Experiences
|
Interview FAQs
|
Online Interviews
|
Exclusive Questions
Get 650+ Questpond's Interview videos on discount
Loading ...
What will be the output of declare @t table(names varchar(MAX)) insert into @t select 'Ram' union all select 'Shyam' union all select 'Jadhu' union all select 'Madhu' DECLARE @NamesList VARCHAR(8000); SELECT @NamesList = COALESCE(@NamesList + ', ', '') + CAST(names AS varchar(20)) FROM @t SELECT CombinedResult = @NamesList + NULL
NOTE: This is objective type question, Please click question title for correct answer.
What will be the output of declare @t table(names varchar(MAX)) insert into @t select 'Ram' union all select 'Shyam' union all select 'Jadhu' union all select 'Madhu' DECLARE @NamesList VARCHAR(8000); SELECT @NamesList = COALESCE(@NamesList + ', ', '') + CAST(names AS varchar(20)) FROM @t SELECT CONCAT(@NamesList,NULL)
NOTE: This is objective type question, Please click question title for correct answer.
What will be the output of declare @t table(names varchar(MAX)) insert into @t select 'Ram' union all select 'Shyam' union all select 'Jadhu' union all select 'Madhu' DECLARE @NamesList VARCHAR(8000); SELECT @NamesList = COALESCE(@NamesList + ', ', '') + CAST(names AS varchar(20)) FROM @t SELECT IIF(CONCAT(@NamesList,NULL) IS NULL , @NamesList + NULL ,CONCAT(@NamesList,NULL))
NOTE: This is objective type question, Please click question title for correct answer.
What will be the output of declare @t table(names varchar(MAX)) insert into @t select 'Ram' union all select 'Shyam' union all select 'Jadhu' union all select 'Madhu' DECLARE @NamesList VARCHAR(8000); SELECT @NamesList = COALESCE(@NamesList + ', ', '') + CAST(names AS varchar(20)) FROM @t SELECT IIF(CONCAT(@NamesList,NULL) IS NOT NULL , @NamesList + NULL ,CONCAT(@NamesList,NULL))
NOTE: This is objective type question, Please click question title for correct answer.
What will be the output of declare @t table(names varchar(MAX)) insert into @t select 'Ram' union all select 'Shyam' union all select 'Jadhu' union all select 'Madhu' DECLARE @NamesList VARCHAR(8000); SELECT @NamesList = COALESCE(@NamesList + ', ', '') + CAST(names AS varchar(20)) FROM @t SELECT @NamesList - NULL
NOTE: This is objective type question, Please click question title for correct answer.
What will be the output of declare @t table(names varchar(MAX)) insert into @t select 'Ram' union all select 'Shyam' union all select 'Jadhu' union all select 'Madhu' DECLARE @NamesList VARCHAR(8000); SELECT @NamesList = COALESCE(@NamesList + ', ', '') + CAST(names AS varchar(20)) FROM @t SELECT @NamesList INTERSECT SELECT NULL
NOTE: This is objective type question, Please click question title for correct answer.
What will be the output of declare @t table(names varchar(MAX)) insert into @t select 'Ram' union all select 'Shyam' union all select 'Jadhu' union all select 'Madhu' DECLARE @NamesList VARCHAR(8000); SELECT @NamesList = COALESCE(@NamesList + ', ', '') + CAST(names AS varchar(20)) FROM @t SELECT @NamesList EXCEPT SELECT @NamesList
NOTE: This is objective type question, Please click question title for correct answer.
What will be the output of declare @t table(names varchar(MAX)) insert into @t select 'Ram' union all select 'Shyam' union all select 'Jadhu' union all select 'Madhu' DECLARE @NamesList VARCHAR(8000); SELECT @NamesList = COALESCE(@NamesList + ', ', '') + CAST(names AS varchar(20)) FROM @t SELECT @NamesList UNION SELECT @NamesList
NOTE: This is objective type question, Please click question title for correct answer.
What will be the output of declare @t table(names varchar(MAX)) insert into @t select 'Ram' union all select 'Shyam' union all select 'Jadhu' union all select 'Madhu' DECLARE @NamesList VARCHAR(8000); SELECT @NamesList = COALESCE(@NamesList + ', ', '') + CAST(names AS varchar(20)) FROM @t SELECT @NamesList UNION ALL SELECT @NamesList
NOTE: This is objective type question, Please click question title for correct answer.
What will be the output of Select Patindex('%[a|b|c|d]%','12345678ABC')?
NOTE: This is objective type question, Please click question title for correct answer.
What will be the output of Select Patindex('%[a|b|c|d]%',REVERSE('12345678ABC'))?
NOTE: This is objective type question, Please click question title for correct answer.
What will be the output of Select STUFF('12345678ABC',1,Patindex('%[a|b|c|d]%',REVERSE(REVERSE('12345678ABC')))-1,'')?
NOTE: This is objective type question, Please click question title for correct answer.
What will be the output of Select STUFF('12345678ABC',1,Patindex('%[a|b|c|d]%',REVERSE(REVERSE('12345678ABC')))-1,REPLICATE('ABC',5))?
NOTE: This is objective type question, Please click question title for correct answer.
What will be the output of Select REPLICATE(STUFF('12345678ABC',1,Patindex('%[a|b|c|d]%',REVERSE(REVERSE('12345678ABC')))-1,''),5) ?
NOTE: This is objective type question, Please click question title for correct answer.
What will be the output of Select CONCAT( REPLICATE(STUFF('12345678ABC',1,Patindex('%[a|b|c|d]%',REVERSE(REVERSE('12345678ABC')))-1,''),5) , STUFF('12345678ABC',1,Patindex('%[a|b|c|d]%',REVERSE(REVERSE('12345678ABC')))-1,'') ) ?
NOTE: This is objective type question, Please click question title for correct answer.
What will be the output of SELECT X FROM (VALUES('1'), (NULL)) AS T(X) INTERSECT SELECT X FROM (VALUES(NULL), (NULL)) AS T(X)
NOTE: This is objective type question, Please click question title for correct answer.
Identify from the below the points for improving the query performance
NOTE: This is objective type question, Please click question title for correct answer.
What is the output of Declare @t table(id int identity, col1 int, col2 int, col3 int, col4 int, col5 int) insert into @t values(23,33,44,55,66),(101,11,304,55,6),(7,3,5,9,1),(4,5,3,6,7),(1,2,3,4,5) select ( select max(n) from ( values(col1),(col2),(col3),(col4),(col5) ) as t(n) ) from @t
NOTE: This is objective type question, Please click question title for correct answer.
What is the output of Declare @t table(id int identity, col1 int, col2 int, col3 int, col4 int, col5 int) insert into @t values(23,33,44,55,66),(101,11,304,55,6),(7,3,5,9,1),(4,5,3,6,7),(1,2,3,4,5) select max(col) from ( select id, col from @t unpivot (col for cols in (col1,col2,col3)) as unpivott ) as p group by id
NOTE: This is objective type question, Please click question title for correct answer.
You have database table named purchaseHistory that contains million of rows. The table have primary key name purcharseId. User frequently use a query that includes the region and status column, with the where clause condition. Your task is to improve the performance of this query?
NOTE: This is objective type question, Please click question title for correct answer.
1
...
76
77
78
79
80
81
82
83
84
85
86
87
88
More SQL SERVER Exclusive Interview Questions & Answers here
Found this useful, bookmark this page to the blog or social networking websites.
Bookmark It
Interview Questions and Answers Categories
.NET Certifications
.NET Core
.NET Framework
ADO.NET
AI ML
Android
Angular
AngularJS 1x
Aptitute Test
ASP.NET
ASP.NET AJAX
ASP.NET Core
ASP.NET MVC
ASP.NET Web API
Aurelia
Azure
Best Practices
BizTalk Server
Bootstrap
C#
Cloud
CMS
CSS 3
Data Structures & Algorithms
Design Pattern & Practices
DotNetFunda.Com
Entity Framework
Error and Solution
F#
Function Points (FPA)
HR
HTML 5
IIS
Interview Questions
JavaScript
jQuery
Kinect
LightSwitch
LINQ
Management
Mobile Development
MSBI (SSIS, SSRS, SSAS)
Mule
Networking
News and Community
Node.js
NoSql
OOPS
Oracle
Others
PostgreSQL
PowerShell
Product Reviews
Project Management
Python
QA (Testing)
R Language
Regular Expressions
SEO
SharePoint
SignalR
Silverlight
Sql Server
TypeScript
UML
VB.NET
Visual Studio
WCF
Web Analytics
Web Services, Remoting
Windows 8
Windows Forms
Windows Metro
Windows Phone
WPF
WWF
XML