56,687
社区成员
发帖
与我相关
我的任务
分享
mysql> select left('江西省南昌市西湖区XXX号',instr('江西省南昌市西湖区XXX号','区')+1);
+-------------------------------------------------------------------------+
| left('江西省南昌市西湖区XXX号',instr('江西省南昌市西湖区XXX号','区')+1) |
+-------------------------------------------------------------------------+
| 江西省南昌市西湖区 |
+-------------------------------------------------------------------------+
1 row in set (0.08 sec)
mysql>
mysql> create temporary table a as select * from user;
Query OK, 9 rows affected (0.22 sec)
Records: 9 Duplicates: 0 Warnings: 0
mysql> create temporary table aa as select username,t.* from user,t;
Query OK, 0 rows affected (0.05 sec)
Records: 0 Duplicates: 0 Warnings: 0
mysql> insert into a(username) values('fd');
Query OK, 1 row affected (0.02 sec)