SQL变量命令帮助 [英] SQL Variable Command Help

查看:66
本文介绍了SQL变量命令帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,

我试图在SQL中打印变量,但它只是返回该字符串的第一个字符.我想念什么吗?

谢谢.


继承人代码:

Hello,

Im trying to print a variabl in SQL but it just return the first Character of that String. Am i missing something?

Thank You.


Heres the Code:

DECLARE @nome_maq varchar

SET @nome_maq = 'MYP'
PRINT @nome_maq



这是结果:

M



Heres the Result :

M

推荐答案

我猜是这样!像这样尝试:

I guess so! Try like that:

DECLARE @nome_maq as varchar(20);

SET @nome_maq = 'MYP'
PRINT @nome_maq



您发现差异了吗?

问候,

曼弗雷德(Manfred)



Did you spot the difference?

Regards,

Manfred


这篇关于SQL变量命令帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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