My database table has ID column which is an auto incremental integer. While inserting data to the table its increment automatically I need to get the value of ID when a record is inserted.
Eg: table employee = |ID| NAME | ADDRESS|
the query is :
insert into employee(NAME, ADDRESS) values("azzi", "test adress")
there is a possible that we can change this query to return the ID soon after record inserted, some one help me to do that.
To select duplicate values, you need to create groups of rows with the same values and then select the groups with counts greater than one. You can achieve that by using GROUP BY and a HAVING clause.
With the SQLite last_insert_rowid() function:
The last_insert_rowid() function returns the ROWID of the last row insert from the database connection which invoked the function.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With