17,082
社区成员
发帖
与我相关
我的任务
分享
-- 楼主的 where 后面,是不是还有别的条件 ?
mysql> create table test(xx varchar(6));
Query OK, 0 rows affected (0.04 sec)
mysql>
mysql> insert into test values('AAA'),('AVBCD');
Query OK, 2 rows affected (0.00 sec)
Records: 2 Duplicates: 0 Warnings: 0
mysql>
mysql> select xx into @cid from test where 1 = 1 limit 1;
Query OK, 1 row affected (0.01 sec)
mysql>
mysql> select @cid ;
+------+
| @cid |
+------+
| AAA |
+------+
1 row in set (0.01 sec)
mysql>
mysql> drop table test;
Query OK, 0 rows affected (0.00 sec)