February 10, 2005 at 10:08 pm
Hi All,
I need to know what is the equivalent syntax in SQL Server for the following ORACLE synatx,
eg:
Declare
Lvno employee.empid%type;
Lvname employee.ename%type;
LvHod employee.hiredate%type;
Lvrow employee%rowtype;
-- Lvno,name,hod inherits the employee table column(s) datatype, length(presicion,scale)
-- Lvrow inherit all the columns in employee table
February 14, 2005 at 8:00 am
This was removed by the editor as SPAM
February 14, 2005 at 9:32 am
As far as I know there is no direct equivalent to this in SQL Server. You can use sp_help <tablename> to generate a list of column names and their types (or write an equivalent script), then copy and paste them into your script.
HTH
February 15, 2005 at 2:11 am
hi all,
Grasshopper's solution will not work out, since inheritance is something like when you change the column width at database level you need not to bother about procedure/function which uses that column, automatically sp will take the column property, any change at column level will not affect frontend.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply