use [db] declare @order nvarchar(50) declare @num nvarchar(50) set @order = '订单号' -- 订单号 set @num = '019' -- 注意,必须使用三位有效数,不足百位的补0; update dindan set [curno] = @num where id = @order