Oracle ã® MERGE ã«ç¸å½ããã³ãã³ãã PostgreSQL ã§è¡ãã«ã¯ï¼
ä»åº¦ãPostgreSQLã§ãµã¤ããæ§ç¯ãããã¨èãã¦ãã¾ããMySQLã¨æå¾ã¾ã§æ©ãã ã®ã§ããã 両è ãæ¯è¼ãã¦ãããããã®ã¡ãªããããã¡ãªãããæ§ç¯ããä¸ã§ã®æ³¨æç¹ãªã©ãæãã¦ãã ããã ï¼MySQLã®æ¹ãã¹ãã¼ããéãã¨ããã®ã¯ ï¼èãåãã§ãã¾ãã ãªããåºæ¬çãªä¿å®ã»ç®¡çã¯ãphpPgAdminãã使ç¨ããäºå®ã§ãã http://phppgadmin.sourceforge.net/
[postgresql]ä¸è¨ã®ãããªæ¿èªå±¥æ´ãã¼ãã«ãããã¾ã id , userid , requestno, flg 1 , hoge@ , 1001, å´ä¸ 2 , uge@ , 1001, æªæ¿èª 3 , hoge@ , 1001, æ¿èª 以ä¸ç¶ã idã¯é£çªãuseridã®åæ°ã¯ä¸å®ã§ã useridãã¨ã«æå¾(idãä¸çªå¤§ãã)ã®æ¿èªçµæãSQLã§ã ãããã®ã§ããã©ãããã°ããã§ãããã ä¸ã®ä¾ã ã¨2ã¨3ã®ã¿æ½åºãããã
PostgreSQLã«ã¤ãã¦ã®è³ªåã§ãã以ä¸ã®ãããªãã¼ãã«ãèãã¾ãã id | user_id | date ---|---------|--------- 1|ãã1| 2007/3/4 2|ãã2| 2007/5/4 3|ãã1| 2007/3/6 4|ãã3| 2007/7/4 5|ãã2| 2007/4/4 6|ãã3| 2007/3/4 ORDERã¨LIMITã使ããã«ãåuser_idãã®ãä»æ¥ã®æ¥ä»ããéå»ããã¤ãä»æ¥ã«è¿ããã®ãã®ãidããåå¾ããSQLãæãã¦ãã ããããããã¯ãã§ããªããã¨ãããã¨ãç´å¾ã§ããå½¢ã§èª¬æãã¦ãã ããã 以ä¸ããããããé¡ããã¾ãã
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ã©ã³ãã³ã°
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}