Ò׽ؽØÍ¼Èí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö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


Ïà¹ØÎÊ´ð£º

mysqlÓÐûÓÐÀàËÆsqlserverµÄÏûÏ¢´«µÝ¹¦ÄÜ

mysqlÓÐûÓÐÀàËÆsqlserverµÄÏûÏ¢´«µÝ¹¦ÄÜ

±ÈÈçÕë¶ÔdbÖ®¼äµÄ»¥Ïà·¢ÏûÏ¢¡¡£¨ÏûÏ¢´«µÝ£©

ûÓС£

³ý·ÇÄã×Ô¼º¸ÄдһÏÂMYSQLµÄÔ´´úÂëÈ»ºó±àÒëÔËÐС£

½èÖúÆäËûÓïÑÔ

ĿǰµÄmysqlÀïÃæÏÖ³ÉÕâÑùµÄ¹¦ÄÜ¡£ ......

MySQL´´½¨´æ´¢¹ý³Ì³ö´í

ÔÚ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ÖÐ repair table

ÔÚmysqlÖÐrepair table xxxxx;Ìáʾ

mysql> repair table recordTbl;
+-----------------+--------+----------+----------------------------------------------+
| Table        ......

MYSQLÖиù¾Ý×Ö¶ÎÖµÅжϷµ»Ø²»Í¬µÄÖµ

ÔÚmysqlÖÐÓÐÒ»ÕÅ±í£¬ÓÐÈý¸ö×Ö¶Îtotal,max, min£¬¶¼ÊÇintÐ͵ÄÖµ£¬¿ÉÒÔдһ¸ösqlÓï¾äÍê³É¹¦ÄÜ£º
¸ù¾ÝÿÌõ¼Ç¼ÖУ¬Èç¹ûtotal>max,·µ»Ø2£¬Èç¹ûtotal <min·µ»Ø1£¬Èç¹û¶¼Ìõ¼þ¶¼²»·ûºÏ·µ»Ø0¡£¼±Ç󣡣¡£¡£¡
mysql? ......

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Àï¿ÉÒÔ£¬µ«ÊÇÈ´² ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ