Variable Declaration and assignment

Database
SCK
Fan

Variable Declaration and assignment

Hi,

 

If I declare a user variable in a TD Stored procedure but fail to assign values to it, what would it be defaulted to while the procedure executes?

 

Thanks,

SCK

1 REPLY 1
Highlighted
Teradata Employee

Re: Variable Declaration and assignment

If you don't assign a DEFAULT value when you DECLARE a local/host variable, it is initialized to NULL. (So if you never assign a value during execution either, it will remain NULL.)