Answers for "elect last id"

SQL
0

get last inserted primary key

INSERT INTO dbo.Table(columns)
OUTPUT INSERTED.p_key, INSERTED.someothercolumnhere .......
VALUES(...)
Posted by: Guest on June-16-2020
0

find last id

//laravel controller
$newOrder = new Order();
...
...
$newOrder->save();

$last_id = $newOrder->id;
Posted by: Guest on November-26-2020

Code answers related to "SQL"

Browse Popular Code Answers by Language