Declaring Variable in Teradata Stored procedure

General
Enthusiast

Declaring Variable in Teradata Stored procedure


Is it possible to declare variable in the following way in Teradata SP



 



SET Variable_name = select column_detail from table where some condition



 



Here the select will return only one value



 



Teradata Version: 12


Tags (1)
2 REPLIES
WAQ
Enthusiast

Re: Declaring Variable in Teradata Stored procedure


What about



SELECT col_name INTO variable_name


WAQ
Enthusiast

Re: Declaring Variable in Teradata Stored procedure


DECLARE variable_name VARCHAR(20);



SELECT col_name INTO variable_name...