cevincheung

PostgreSQL 获取自增 ID 的问题

  •  
  •   cevincheung · Sep 9, 2015 · 3488 views
    This topic created in 4004 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   ·   952 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 21ms · UTC 21:54 · PVG 05:54 · LAX 14:54 · JFK 17:54
    ♥ Do have faith in what you're doing.