cevincheung

PostgreSQL 获取自增 ID 的问题

  •  
  •   cevincheung · Sep 9, 2015 · 3429 views
    This topic created in 3970 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   ·   995 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 37ms · UTC 19:37 · PVG 03:37 · LAX 12:37 · JFK 15:37
    ♥ Do have faith in what you're doing.