ãããããã¿ã¼ã³ã§ããããããã¼ãã«ã INSERT ããç´å¾ã«ãé¢é£ãããã¼ãã«ã«ããã¼ã¿ã INSERT ããå¿ è¦ããã£ã¦ãæåã« INSERT ãããã¼ãã«ã®ãã¼é ç®ã®å¤ãåããããã ãã©ããã®ãã¼é ç®ã¯ã·ã¼ã±ã³ã¹ã§è¨å®ãã¦ãããã¿ãããªå ´åã®è©±ã§ãã currval é¢æ°ã使ã£ã¦æ¬¡ã®ãããªæãã«ã§ãã¾ãã -- ãã¼ã¿ã INSERT INSERT INTO hoge (hoge_no, hoge_text) VALUES (nextval('hoge_no_seq'), 'ã»ãã'); -- ç´åã®ã·ã¼ã±ã³ã¹å¤ãåå¾ SELECT currval('hoge_no_seq'); currval é¢æ°ã¯åä¸ã»ãã·ã§ã³ä¸ã§è¨å®ãããç´åã®ã·ã¼ã±ã³ã¹å¤ãè¿ããã¨ãä¿è¨¼ãã¦ããã®ã§ãä»ã®ããã°ã©ã ããã nextval ãã¬ã³ã¬ã³ä½¿ããã¦ãããããªç°å¢ã§ãããã£ããç´åã®å¤ãè¿ãã¦ããã
{{#tags}}- {{label}}
{{/tags}}