set变量赋值=和:=的区别

mysql> SET @test = 123;
Query OK, 0 rows affected (0.00 sec)

mysql> SELECT @test2=@test;  
+--------------+
| @test2=@test |
+--------------+
|         NULL |
+--------------+
1 row in set (0.00 sec)

mysql> SELECT @test2:=@test;
+---------------+
| @test2:=@test |
+---------------+
|           123 |
+---------------+
1 row in set (0.00 sec)

mysql>

上一篇:putty xshell远程连接Linux及密钥认证


下一篇:SharePoint自动化系列——Upload files to SharePoint library using PowerShell.