how declare in stored procedure year datatype in sql server code example Example: how to declare a variable in sql DECLARE @COURSE_ID AS INT, @COURSE_NAME VARCHAR (10);