字段有article_id article_name article_title article_content
我想修改两个值,sql语句老是通不过,请帮忙!
CREATE PROCEDURE [dbo].[sql_update_article]
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article and article_title=@title_article
where article.article_id=@id_article
请给出解决方法!!!
6 个解决方案
#1
CREATE PROCEDURE [dbo].[sql_update_article]
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article, article_title=@title_article
where article.article_id=@id_article
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article, article_title=@title_article
where article.article_id=@id_article
#2
楼上正解
#3
CREATE PROCEDURE [dbo].[sql_update_article]
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article, article_title=@title_article
where article.article_id=@id_article
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article, article_title=@title_article
where article.article_id=@id_article
#4
CREATE PROCEDURE [dbo].[sql_update_article]
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article, article_title=@title_article
where article.article_id=@id_article
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article, article_title=@title_article
where article.article_id=@id_article
#5
CREATE PROCEDURE [dbo].[sql_update_article]
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article , article_title=@title_article
where article.article_id=@id_article
--樓主要把and換成逗號,
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article , article_title=@title_article
where article.article_id=@id_article
--樓主要把and換成逗號,
#6
CREATE PROCEDURE [dbo].[sql_update_article]
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article, article_title=@title_article
where article.article_id=@id_article
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article, article_title=@title_article
where article.article_id=@id_article
#1
CREATE PROCEDURE [dbo].[sql_update_article]
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article, article_title=@title_article
where article.article_id=@id_article
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article, article_title=@title_article
where article.article_id=@id_article
#2
楼上正解
#3
CREATE PROCEDURE [dbo].[sql_update_article]
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article, article_title=@title_article
where article.article_id=@id_article
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article, article_title=@title_article
where article.article_id=@id_article
#4
CREATE PROCEDURE [dbo].[sql_update_article]
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article, article_title=@title_article
where article.article_id=@id_article
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article, article_title=@title_article
where article.article_id=@id_article
#5
CREATE PROCEDURE [dbo].[sql_update_article]
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article , article_title=@title_article
where article.article_id=@id_article
--樓主要把and換成逗號,
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article , article_title=@title_article
where article.article_id=@id_article
--樓主要把and換成逗號,
#6
CREATE PROCEDURE [dbo].[sql_update_article]
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article, article_title=@title_article
where article.article_id=@id_article
@id_article int,
@title_article nvarchar(50),
@content_article nvarchar(50)
AS
update article
set article_content=@content_article, article_title=@title_article
where article.article_id=@id_article