CREATE UNIQUE INDEX <someuniquename> on H1 (...the unique columns...).

Primary key is (except for the INTEGER PRIMARY KEY in a rowid table) and in 
WITHOUT ROWID tables where it is the key of the b-tree, just semantic sugar for 
a UNIQUE index ...

---
The fact that there's a Highway to Hell but only a Stairway to Heaven says a 
lot about anticipated traffic volume.


>-----Original Message-----
>From: sqlite-users [mailto:sqlite-users-
>boun...@mailinglists.sqlite.org] On Behalf Of Peng Yu
>Sent: Wednesday, 10 April, 2019 06:11
>To: SQLite mailing list
>Subject: [sqlite] Does sqlite3 support alter table add primary key?
>
>Hi,
>
>I got the following error. Does sqlite3 support alter table add
>primary key?
>
>sqlite> alter table mytab add primary key (h1);
>Error: near "primary": syntax error
>
>https://www.tutorialspoint.com/sqlite/sqlite_primary_key.htm
>
>--
>Regards,
>Peng
>_______________________________________________
>sqlite-users mailing list
>sqlite-users@mailinglists.sqlite.org
>http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users



_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to