oracle 对应的MySQL的语句
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里可以,但是却不能改属性的名字。
SQL code:
create table book1 select book_name,price form book;
SQL code:
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: 0
mysql> select * from t4;
+----+------+
| id | f |
+----+------+
| 1 | 1 |
| 2 | 2 |
| 3 | 3 |
+----+------+
3 rows in set (0.00 sec)
mysql>
SQL code:
mysql> create table book1 as select name as testname from a;
Query OK, 6 rows affected (0.22 sec)
Records: 6 Duplicates: 0 Warnings: 0
mysql> select * from book1;
+----------+
| testname |
+----------+
| chen |
| chen |
| zhao
相关问答:
我安装一台redhat linux5+oracle 10g的服务器,笔记本(XP系统)安装了oracle 10g客户端,结果老是出12560的错误,请高手指点一二,
-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dpor ......
在MySQL5.0中船舰存储过程通不过,提示:
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' ......
在mysql中有一张表,有三个字段total,max, min,都是int型的值,可以写一个sql语句完成功能:
根据每条记录中,如果total>max,返回2,如果total <min返回1,如果都条件都不符合返回0。急求!!!!
mysql? ......