0x00 记忆方式

limit 0,1 into @,@,@,@,x

0x01 实验

  1. # 可以很明显看得到是3列
  2. mysql> select * from tdb_admin limit 0,1;
  3. +----+----------+----------------------------------+
  4. | id | username | password |
  5. +----+----------+----------------------------------+
  6. | 1 | admin | 7fef6171469e80d32c0559f88b377245 |
  7. +----+----------+----------------------------------+
  8. 1 row in set
  1. # 输入 into @时爆列名不一致了
  2. mysql> select * from tdb_admin limit 0,1 into @;
  3. 1222 - The used SELECT statements have a different number of columns
  1. # 输入 into @,@,@ 时显示ok了,说明 tdb_admin表 列数为 3
  2. mysql> select * from tdb_admin limit 0,1 into @,@,@;
  3. Query OK, 1 row affected