Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sql declare variable single line

-- Old clunky way of doing things prior to SQL Server 2008
DECLARE @myVar VARCHAR(100);
SET @myVar = 'Some Value';

-- New, amazing way of declaring variables
DECLARE @myVar VARCHAR(100) = 'Some Value';
Source by examplesql.com #
 
PREVIOUS NEXT
Tagged: #sql #declare #variable #single #line
ADD COMMENT
Topic
Name
7+5 =