update语句如何同时更新不同条件的两条记录?
发布网友
发布时间:2022-04-11 23:25
我来回答
共3个回答
热心网友
时间:2022-04-12 00:54
UPDATE 表
SET
地址 = case when id = 1 then '192.168.1.137' else 地址 end,
网卡 = case when id = 2 then '112233445566' else 网卡 end
WHERE
id in (1,2)
热心网友
时间:2022-04-12 02:12
use master
go
create procere sp_dropextendedproc --- 1996/08/30 20:13
@functname nvarchar(517) -- name of function
as
/*
** If we're in a transaction, disallow the dropping of the
** extended stored procere.
*/
set implicit_transactions off
if @@trancount > 0
begin
raiserror(15002,-1,-1,'sp_dropextendedproc')
return (1)
end
/*
** Drop the extended procere mapping.
*/
dbcc dropextendedproc( @functname )
return (0) -- sp_dropextendedproc
在查询分析器运行一下就行了
希望对你有帮助
热心网友
时间:2022-04-12 03:47
use master
go
create procere sp_dropextendedproc --- 1996/08/30 20:13
@functname nvarchar(517) -- name of function
as
/*
** If we're in a transaction, disallow the dropping of the
** extended stored procere.
*/
set implicit_transactions off
if @@trancount > 0
begin
raiserror(15002,-1,-1,'sp_dropextendedproc')
return (1)
end
/*
** Drop the extended procere mapping.
*/
dbcc dropextendedproc( @functname )
return (0) -- sp_dropextendedproc
在查询分析器运行一下就行了
请参考