Oracle get id of inserted row with identity always [duplicate]
问题 This question already has answers here : Inserting into Oracle and retrieving the generated sequence ID (5 answers) Closed 2 years ago . Currently I have a table with this structure: CREATE TABLE "DUMMY_SCHEMA"."NAMES" ( "ID" NUMBER(10,0) GENERATED ALWAYS AS IDENTITY (START WITH 1 INCREMENT BY 1 CACHE 20) NOT NULL , "NAME" NVARCHAR2(1024) NOT NULL , CONSTRAINT "NAMES_PK" PRIMARY KEY ("ID") ); In SQL Server I only need to do following to get the Id of the inserted row. INSERT INTO [NAMES](