[英]what does this symbol mean := in sql
what does this mean 这是什么意思
:=
:=
in sql ? 在SQL中?
if found some sql using like that symbol example 如果使用类似该符号的示例找到了一些sql
select col1, col2, @pv:=col3 as 'col3' from table1
join
(select @pv:=1)tmp
where col1=@pv
Thank you in advance. 先感谢您。
using this: here variable are prepended with an @ sign to suggest user-defined variable.
使用此方法:此处的变量前面带有@符号,以建议
user-defined variable.
A variable, without @, is a system variable, which you cannot define yourself. 没有@的变量是系统变量,您无法定义自己。
SET @pv:=1// we set a variable
ie :=
is used as assignment operator like normal =
else where. 即
:=
用作分配运算符,就像normal =
else一样。
see here: http://dev.mysql.com/doc/refman/5.0/en/user-variables.html 看到这里: http : //dev.mysql.com/doc/refman/5.0/en/user-variables.html
and also see a good post here: MySQL: @variable vs. variable. 并在此处看到一个不错的帖子: MySQL:@variable vs. variable。 Whats the difference?
有什么不同?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.