如何将sql值存储为另一个值? [英] how to stored the sql value to another value?

查看:57
本文介绍了如何将sql值存储为另一个值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我该怎么办?
该值取自用户界面

what should i do is?
this value is taken from user interface

@Script="Select Person_Name from Person where Person_Id=3"



现在我必须使用存储过程将该Person_Name存储到数据库吗?
请帮助!!



now i have to stored that Person_Name to database using stored procedure?
PLease Help!!!

推荐答案

如果结果始终是一行,则可以像这样存储值

If the result is always a single row, you can store the value like this

DECLARE @PName VARCHAR(MAX)
SELECT @PName = Person_Name FROM Person WHERE Person_Id = 3


这篇关于如何将sql值存储为另一个值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆