易截截图软件、单文件、免安装、纯绿色、仅160KB

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


相关问答:

php 中查询oracle date 类型数据的问题?

日前用oci函数查询oracle数据时出现个问题,就是在查询到date类型的数据时,使用pl/sql 查询oracle库中的数据显示是
2009-9-29 12:12:12
但是通过语句select * from tablename 查询,使用oci_fetch_array() ......

大侠们救命啊:Mysql的my.ini文件更改数据库路径问题

  我安装好mysql后,默认的数据库路径是在C盘下,我想把它改到E盘里: 我先把mysql服务停止,再在mysql安装目录(也是在E盘)下找到my.ini文件,就改了下面那么多:
#Path to the database root
datadir="E ......

MYSQL中根据字段值判断返回不同的值

在mysql中有一张表,有三个字段total,max, min,都是int型的值,可以写一个sql语句完成功能:
根据每条记录中,如果total>max,返回2,如果total <min返回1,如果都条件都不符合返回0。急求!!!!
mysql? ......

Winform+MySQL做项目

Winform+MySQL做项目,在注重性能的情况下,我该如何去完成这类型的项目呢!
请各位给以提示。
你这个范围太广了,我说2点重要的吧
1.WINFORM程序是单独运行的CS程序,和BS不同,BS的压力始终都在SERVER上的,对C ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号