Skip to content

The id of the new record with PostgreSQL, how? #69

@asarch

Description

@asarch

One stupid question: with PostgreSQL, how would you get the id of the newly created record?

(with-connection (db :school)
   (execute
    (insert-into :students
       (set=
	     :last_name "Uzumaki"
	     :first_name "Naruto"
	     :address "Ever green st #598, Konoha"
       (returning :id)))))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions