Wednesday, March 21, 2012

Primary Key in table variable

hello,

i want to create a table variable that has a primary key that contains more than one column.
In the example below the key should include prodID,catID to be unique

declare @.t_CNETPickList table (
prodID varchar(16) primary key ,
catid char(2),
AtrID char(6),
AtrText varchar(255),
number int ,
text varchar(255)
)

Is this possible?declare @.t_CNETPickList table (
prodID varchar(16) ,
catid char(2),
AtrID char(6),
AtrText varchar(255),
number int ,
text varchar(255)

, primary key ( prodID,catID )

)

rudy
http://r937.com/|||thanks

No comments:

Post a Comment