日期:2014-05-18  浏览次数:20538 次

数据插入问题尽量能写成存储过程的 在线等待
SQL code

INSERT INTO tb_NewsBoard(newsTitle,newsContent,newsDate,boardTitle,browseCount) 
values('1','1','1','下面查出来的值',0)

select  boardTitle from tb_Board where managerID=以知



怎么写在一起 用存储过程

------解决方案--------------------
SQL code
crate proc pp
@par1 varchar(100)
as
begin
declare @v varchar(8000)
select @v=boardTitle from tb_Board where managerID=@par1
INSERT INTO tb_NewsBoard(newsTitle,newsContent,newsDate,boardTitle,browseCount)  
values('1','1','1',@v,0)


end