悬赏园豆:15
[已解决问题]
解决于 2008-06-17 23:09
<P>CREATE PROCEDURE UP_SetRegisterUserToPublisher<BR>(<BR> @UserID int,<BR> @RoleName nvarchar(40)<BR>)<BR>AS</P>
<P> insert into 表1(字段1, 字段2) values(@UserID,"数据2")</P>
<P>数据2 = SELECT TOP 1 RoleID FROM Roles WHERE RoleName = @RoleName</P>
<P>如何定义一个变量数据2存储起来?<BR>怎么写这个存储过程呢?我试了很久,都不行。无奈只好求助。谢谢。</P>