Create a primary key on two columns

I use the SQLite GUI browser to work with the database. I cannot find a button to make a primary key on two or more columns. How to do it?

+3
source share
1 answer

SQLite does not support adding constraints.

You need to create a new table, specifying its entire column structure and import the old data into the new table. Then rename the new one after you drop the old one.

0
source

Source: https://habr.com/ru/post/1771325/


All Articles