= Only when setting and updating does it have the same effect as :=, that is, assignment; otherwise it has the effect of equality. In view of this, when using variables to implement line numbers, you must use :=. := It not only has the function of assigning values when setting and updating, but also when selecting. The following is a comparison of the effects of = and = in select sql set @num = 0; SELECT @num := @num+1 AS rowno, nc as nickname from table_user; result sql set @num = 0; SELECT @num = @num+1 AS rowno, nc as nickname from table_user; result sql set @num = 0; SELECT @num = @num AS rowno, nc as nickname from table_user; result Reference: https://www.jb51.net/article/167218.htm Summarize The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. You may also be interested in:
|
<<: Use the Linux seq command to generate a sequence of numbers (recommended)
>>: js implements axios limit request queue
This article shares the installation and configur...
Table of contents definition grammar Examples 1. ...
Insert Baidu Map into the web page If you want to...
Preface JSON is a lightweight data exchange forma...
ENV: [root@centos7 ~]# uname -r 3.10.0-514.el7.x8...
1. CSS background tag 1. Set the background color...
We use the translate parameter to achieve movemen...
It is very common to use webpack to build single-...
This article shares the specific code of videojs+...
1. MS SQL SERVER 2005 --1. Clear the log exec(...
Dependence on knowledge Go cross-compilation basi...
Effect The effect is as follows Implementation ...
Table of contents The server runs jupyter noteboo...
Table of contents 1. Install Docker 2. Install an...
console.log( [] == ![] ) // true console.log( {} ...