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
Ïà¹ØÎÊ´ð£º
»·¾³£º1.win2003server+oracle9i
2.oracle9i×Ö·û¼¯ÎªAMERICAN_AMERICA.WE8ISO8859P1
3.oracle sql developer°æ±¾ 1.5.5
ÏÖÏóÃèÊö: 1.ÔÚsql developer ÖвéѯoracleÖеÄij¸ö±í£¬ÖÐÎÄÈ«²¿ÏÔʾΪÂÒÂë¡£
......
Ò»¸öÐÐÒµÍøÕ¾£¬ÒªÊµÏֵŦÄÜÒªÇóΪ£º
Ò»ËÑË÷±íµ¥¿ÉÑ¡ËÑË÷ ²úÆ·/×ÊѶ/É̼ң¬ËÑË÷ʱϣÍûÏÈËѱêÌâºóÈ«ÎÄ£¬µ±Ç°µÄÊý¾ÝÁ¿¹À¼Æ3Íò¶à£¬¶¨Î»ÆÚÍûÔÚ°ÙÍò¼¶Ò²¿ÉÓá£
Êý¾ÝÀàÐÍΪinnodb£¬µ±Ç°µÄ·½·¨ÊǶԹؼü´Ê½øÐÐ ......
ÔÚ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±¸·ÝµÄÎÊÌâ¡£
ÎÒµÄÊý¾Ý¿âÀïÓÐһЩÓÃcreate function½¨Á¢µÄ×Ô¶¨Ò庯Êý¡£µ±ÎÒÓÃmysqldump±¸·Ý¸ÃÊý¾Ý¿âÈ»ºóµ¼Èëµ½ÁíÍâÒ»¸ö·þÎñÆ÷BÉÏ£¬·¢ÏÖ·þÎñÆ÷BÉÏÖ»ÓÐÊý¾Ý£¬¶øûÓÐÄÇЩ×Ô¶¨ÒåµÄº¯Êý¡£Î ......