Inserting a duplicate row in Sqlite with new unique id

I have a db table in SQLite and have a need to duplicate a row. I found the following on StackOverflow (similar but modified) and wanted to see if this is the correct syntax below. The table’s id column is the primary key set to auto increment

db.ExecuteSQL("INSERT INTO myTable (column1, column2, column3) SELECT column1, column2, column3 FROM myTable WHERE id = '5'")

Is id TEXT ? If integer remove the single quotes.

1 Like

Thanks Rick!

1 Like