cevincheung

PostgreSQL 获取自增 ID 的问题

  •  
  •   cevincheung · Sep 9, 2015 · 3413 views
    This topic created in 3958 days ago, the information mentioned may be changed or developed.

    明明可以通过SELECT LASTVAL () AS insert_id很方便的获取同一个连接( session )中的最后插入的 insert id 。那为什么还要非得用select currval (regclass::seqname )来获取 id 呢?

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3102 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 06:43 · PVG 14:43 · LAX 23:43 · JFK 02:43
    ♥ Do have faith in what you're doing.