How do I get the id of the record inserted

Hello.
How do I get the id of the record inserted with the macro sc_exec_sql?
Example:
$ id = sc_exec_sql (“INSERT INTO …”);
(this returns the sql statement but not the inserted id)

Hello.
execute a select stament

select LAST_INSERT_ID()

(this returns the last id generated)

1 Like