postgreSQL¤«¤émysql¤Ø¤Î°Ü¹Ô¤Çµ¤¤òÉÕ¤±¤¿¤¤ÅÀ
postgresql¤Ç¡¢¤¢¤ë¾®¤µ¤Ê¥·¥¹¥Æ¥à¤ò¹½ÃÛ½àÈ÷¤·¤Æ¤Þ¤·¤¿¡£
¸½¾õ¤¢¤ë¥·¥¹¥Æ¥à¤ò¤½¤Á¤é¤ËºÜ¤»ÊѤ¨¤ë¤È¤¤¤¦»ö¤Ç¡¢
´û¸¤Î¥Ç¡¼¥¿¤ò¤½¤Î¤Þ¤Þ»È¤¤¤¿¤¤¡£
ºÇ½é¤Ë³Îǧ¤·¤Æ¤ª¤±¤Ð¤¹¤ó¤À»ö¤À¤±¤É¡¢postgres¤ÎDB¥¨¥ó¥³¡¼¥É¤¬EUC¤Ç¡¢
Êѹ¹¤Ç¤¤Ê¤¤»ö¤¬¥Ç¡¼¥¿¤Î°Ü¹Ô¥Æ¥¹¥È¤ÎÃʳ¬¤Ç¤ï¤«¤Ã¤¿¡£
¿·µ¬DBºîÀ®¤âµö²Ä¤µ¤ì¤Æ¤¤¤Ê¤«¤Ã¤¿¡£
¸µ¤Î¥·¥¹¥Æ¥à¤¬UTF8¤Ê¤Î¤Ç¡¢µ¡¼ï°Í¸´ÝÉդʸ»ú¤¬¤Ð¤ó¤Ð¤ó»È¤ï¤ì¤Æ¤¤¤ë¡£
¤½¤ì¤ò¤½¤Î¤Þ¤Þ»È¤¨¤ë¤è¤¦¤Ë¤·¤¿¤¤¤·¡¢¿·¤·¤¤Æþ¤ìʪ¤ÏUTF8¤Ç¤Ê¤¤¤È¤¤¤±¤Ê¤¤¡£
mysql¤Ê¤é¿·µ¬DB¤âºîÀ®¤Ç¤¤ë¤·¡¢¤½¤â¤½¤âUTF8¤À¤Ã¤¿¤Î¤Ç¡¢
µÞĤ¯¤ê¤«¤¨¤ë¤³¤È¤Ë¤·¤¿¡£
¤½¤ÎºÝ¡¢¼ï¡¹¤ÎÌäÂ꤬ȯÀ¸¤·¤¿¤Î¤Ç³Ð¤¨½ñ¤¤ò»Ä¤·¤Æ¤ª¤¯¡£
¢£¥Ç¡¼¥¿·¿
timestump·¿¤Ïdatetime·¿¤Ë¤¹¤ë¡£
¡ÊÊ£¿ô¥«¥é¥à¤¢¤ë¤¿¤á¡Ë
¢£php
´Ø¿ô̾¤ò¡Öpg_¡×¤«¤é¡Ömysql_¡×¤ËÃÖ´¹
mysql_fetch_object¤Ï¹ÔÈÖ¹æ»ØÄê¤Ç¼èÆÀ¤Ç¤¤Ê¤¤¤Î¤Ç¡¢
mysql_data_seek¤Ç¥Ý¥¤¥ó¥¿°ÌÃÖ¤ò»ØÄꤹ¤ë¡£
¢£Ê¡Ì䤤¹ç¤ï¤»
¥µ¥Ö¥¯¥¨¥ê¤¬¤Þ¤ºÅ¸³«¤µ¤ì¤ë¤Î¤Ç¡¢¥µ¥Ö¥¯¥¨¥ê¤Ë̵ÍѤʷë²Ì¤¬´Þ¤Þ¤ì¤ë¤È
ÁíÅö¤¿¤ê¤È¤Ê¤ê¡¢ËÄÂç¤Ë¤Ê¤ë¡£¡ÊÈ¿±þÃÙ¤¤¡Ë
¥µ¥Ö¥¯¥¨¥ê¤ÎSELECTʸ¤Ï¤Ç¤¤ë¤À¤±¾ò·ï¤òÆþ¤ì¤¿Êý¤¬Îɤ¤¡£
UPDATE a_table,(SELECT * FROM b_table)o_table SET a_table.name=o_table.oldname where a_table.code=o_table.code and o_table.num=1;
¢
UPDATE a_table,(SELECT * FROM b_table where num=1)o_table SET a_table.name=o_table.oldname where a_table.code=o_table.code;
¢£mysql¤Ç¤ÏÀµµ¬É½¸½¤Ë¤è¤ëÃÖ´¹¤¬½ÐÍè¤Ê¤¤
¤³¤ì¤ÏÌÌÅݤÀ¤Ã¤¿¤·¡¢º£²ó¤Ïpostgres¤Ë»ý¤Ã¤Æ¤Ã¤Æ½èÍý¤·¤¿¡£
¤¢¤ëÆÃÄê¤Îʸ»ú¤Ë¶´¤Þ¤ì¤¿¿ôÃͥǡ¼¥¿¤ò¤È¤ê¤À¤·¤¿¤«¤Ã¤¿¤À¤±¤Ê¤Î¤Ç¡¢
¤½¤ì¤Ç¤¤¤±¤¿¤±¤ì¤É¡¢Ê¸»ú¥³¡¼¥É¤Ë±Æ¶Á¤µ¤ì¤ëÍͤÊʸ»úÎó¤À¤Ã¤¿¤é¤½¤ì¤Ï¤Ç¤¤Ê¤¤¤·¡¢
¥¹¥Æ¥Ã¥×Ƨ¤à¤·¤«¤Ê¤¤¤«¤Ê¡£
php¤ÇREGEXP¤ÈREPLACE¤ò»È¤Ã¤ÆÃÖ´¹¤¹¤ëÊýË¡¤ò¤È¤ë¤È¤«¡£
°Ê¾å¡¢»ä¤Î¥á¥â½ñ¤¡£
ÁǿͤʤΤÇɽ¸½¤äÊýË¡¤¬´Ö°ã¤Ã¤Æ¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¡£
ÀΤϴÝÉդʸ»ú¤Ê¤ó¤«¡¢ÍøÍѼԤÎÊý¤ËÀ©¸Â¤µ¤»¤Æ¡¢
ʸ»ú²½¤±¤·¤¿¤éÍøÍѼԤΤ»¤¤¤Ë¤¹¤ë¤È¤«ÉáÄ̤À¤Ã¤¿¤±¤É¡¢
º£¤Ï´ÝÉդʸ»ú¤âµ¡¼ï°Í¸ʸ»ú¤â»È¤¦¤â¤ó¤Í¡£
»ä¤Ïº£¤â»È¤ï¤Ê¤¤¤±¤É¡£