New answers tagged

2

Create a temp table, put in your users and use that in your delete statement: CREATE TABLE delete_users (user_id ... primary key); INSERT INTO delete_users (user_id) values (...),(...)...; DELETE FROM [dbo].[Table] x WHERE EXISTS ( SELECT 1 FROM delete_users y WHERE x.user_id = y.user_id ); DROP TABLE delete_users;


1

Just copy the ID values over: CREATE TABLE messages (_id INTEGER PRIMARY KEY AUTOINCREMENT, key_remote_jid TEXT NOT NULL); ATTACH 'msgstoreF.db' AS android; INSERT INTO messages (_id, key_remote_jid) SELECT _id, key_remote_jid FROM android.messages; Please read the SQLite Autoincrement documentation. New ID values will not conflict with the ...


2

When the trader can have different products and products are linked to different trader. You need a relationship tables Trader_Products, which will represent the n:m relationship So option 2 is the right answer.


Top 50 recent answers are included