易截截图软件、单文件、免安装、纯绿色、仅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


相关问答:

linux + oracle用XP访问不了

我安装一台redhat linux5+oracle 10g的服务器,笔记本(XP系统)安装了oracle 10g客户端,结果老是出12560的错误,请高手指点一二,

-A RH-Firewall-1-INPUT -m state –state NEW -m tcp -p tcp –dpor ......

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

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

MySQL数据包过大

我用一个循环往数据库里面存文件,本来可以作为文件存放数据库里面只放文件的位置的,但是没有办法租的服务器网页空间大小有限制数据库没有限制。语句是这样的


public static final DataBase.MAXSIZE=102 ......

关于mysql存储过程变量的问题?

关于mysql存储过程变量的问题?变量什么时候前面要加@符号,用declare声明的变量与前者有和区别,我不懂?
@是用来屏蔽错误或警告的,当前面加了@符号后,若此处有错或警告,网页将不显示出来。

前面加@代表会话 ......

mysql的连接超时时间怎么设置 - VC/MFC / 数据库

我是用mysql自带的C API
if(mysql_real_connect(&mysql,"125.0.0.108","root","root","home",3306,NULL,0))

AfxMessageBox("数据库连接失败") ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号