.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> DataBase >> Post New Resource Bookmark and Share   

 Subscribe to Articles

String Concatenation and Scope Resolution Operator in SQL Server 2008 R2

Posted By:Dhananjay Kumar       Posted Date: March 03, 2011    Points: 200    Category: DataBase    URL: http://www.dotnetspark.com  

In this article you will learn String Concatenation and Scope Resolution Operator in SQL Server 2008 R2.
 

Target Audience: Beginners

SQL Server 2008 R2 comes with String Concatenation Operator.

String Concatenation operator is denoted by symbol plus '+'.



Output we will get,



String concatenation operator can concatenate string with real time data of any type also.



In above query , firstName and lastName column is being concatenated using string concatenation operator of SQL Server 2008 R2. In above query we are also concatenating HireDate . Since HireDate is of type DateTime , we need to convert that first before concatenating.



SQL Server 2008 R2 comes with Scope Resolution Operator.

Scope Resolution operator is denoted by symbol '::'

It is used to access static members of compound data type.



In above query hierarchyId is a compound data type. And we are accessing static function GetRoot() of this type.

Output

 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend