Reputation: 139
In Oracle we create variables using %TYPE so that the variable has the same data type as the column's data type.
example
c_FolderType Folder.FolderType%TYPE;
c_FolderYear Folder.FolderYear%TYPE;
May I know how do I handle it in SQL Server. Do we have a similar option in SQL Server or the only option is to manually assign a data type
Upvotes: 0
Views: 216
Reputation: 415840
This is a language extension that is not a standard (ansi) part of SQL. Sql Server does not do this, and requires you to set the type manually.
Upvotes: 2