orcle 语句 create table book1(name, price) as select book_name, price form book;
对应的MySQL的语句是什么 create table book1 as select book_name, price form book; 这样在MySQL里可以,但是却不能改属性的名字。
对应的MySQL的语句是什么 create table book1 as select book_name, price form book; 这样在MySQL里可以,但是却不能改属性的名字。
解决方案 »
- 上海期货回调函数OnRtnDepthMarketData数据插入mysql的时候报错
- mysql 对于 select 一列多值 有什么好的替代方法?
- linux下修改mysql连接
- TimeDiff函数使用
- left join 怎么排序 谁知道啊?详细问题见贴内
- mysql function 疑問
- 高手们,100分相送
- 有什么好的客户端工具查看MySQL数据库,就是有没有那种类似问题SQLServer那样的MySQL?
- 还是两表查询问题 union all 为什么只能取到其中的前面的而后没有,求大侠指点。
- mysql存储过程总是失败
- MYSQL中怎么删除重复的号码?
- 求助,请问怎么查询数据表中大于当前时间的记录呢??
create table book1 select book_name,price form book;
mysql> select * from t1;
+---+------+---------+
| a | f | message |
+---+------+---------+
| 1 | 1 | Testing |
| 2 | 2 | table |
| 3 | 3 | t1 |
+---+------+---------+
3 rows in set (0.11 sec)mysql>mysql> create table t4 as select a as id,f from t1;
Query OK, 3 rows affected (0.11 sec)
Records: 3 Duplicates: 0 Warnings: 0mysql> select * from t4;
+----+------+
| id | f |
+----+------+
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
+----+------+
3 rows in set (0.00 sec)mysql>
Query OK, 6 rows affected (0.22 sec)
Records: 6 Duplicates: 0 Warnings: 0mysql> select * from book1;
+----------+
| testname |
+----------+
| chen |
| chen |
| zhao |
| sun |
| zhao |
| chen |
+----------+
6 rows in set (0.00 sec)