SELECT: return literal values that are just part of an expression : Select « Select Query « SQL Server / T-SQL






SELECT: return literal values that are just part of an expression


1>
2> 
3>
4> 
5>
6> -- SELECT: return literal values that are just part of an expression.
7>
8> SELECT 'Joe' As FirstName, 'Yin' As LastName
9> GO
FirstName LastName
--------- --------
Joe       Yin

(1 rows affected)
1>
           
       








Related examples in the same category

1.Use regular expressions to retrieve table data
2.Sorting Results
3.Using Functions in Queries
4.Using TOP in select statement
5.Select a single row
6.Group by, having and order
7.Use your function in select statement
8.Using the CASE Statement
9.Queries Involving Null Values
10.Get full details of all departments using *
11.An expression-type result set can be aliased and treated as if it were a table
12.Select with 'Case when'