mysql 5.1版本
临时表A,临时表B ,结构一样
insert into A(C1,C2)
select C1,C2 from B limit 10;--- limit 10 报错。请教,怎么改才能limit呢?在线等解答
临时表A,临时表B ,结构一样
insert into A(C1,C2)
select C1,C2 from B limit 10;--- limit 10 报错。请教,怎么改才能limit呢?在线等解答
解决方案 »
- mysqldump在命令行里总是备份不到新数据
- mysql设置事务隔离级别没有效果???
- mysql 错误码: 1064
- postgresql:Cannot parallelize that UPDATE yet
- MYSQL中怎样实现ORACLE中的(+)……
- 非常棘手的mysql问题 大家来看看
- Table 中的某一個欄位, 由 Char(10)改為 Char(100), 速度全部都慢下來什麼原因造成
- 如何编写mysql的分页sql?
- 有关Postgresql启动的问题
- 数据库高手看过来: sqlite 当将整数保存进sqlite数据库的时候,,如何自动添加两位小数,,如:8 存进数据库后变为8.00
- mysqldump远程的问题
- 请教sql怎么处理连续登陆日期的最小值。
insert into A(C1,C2) select * from c;
+------+--------+----------+
| id | userid | friendid |
+------+--------+----------+
| 0 | 1 | 3 |
| 1 | 1 | 4 |
| 2 | 2 | 3 |
| 3 | 2 | 6 |
| 4 | 3 | 5 |
| 5 | 3 | 6 |
| 6 | 4 | 5 |
| 7 | 4 | 2 |
| 8 | 5 | 2 |
| 9 | 5 | 7 |
| 10 | 6 | 7 |
| 11 | 6 | 8 |
+------+--------+----------+
12 rows in set (0.04 sec)mysql> create table tb_2 like tb_1;
Query OK, 0 rows affected (0.18 sec)mysql> insert into tb_2 select * from tb_1 limit 5;
Query OK, 5 rows affected (0.05 sec)
Records: 5 Duplicates: 0 Warnings: 0我这个是可以的。