sqldatabasesqliteuniquesqlitestudio

SQLiteStudio: How to create unique row (not column)?


I want to create a table that only allows unique rows with SqliteStudio:

This should work:

|--ID--|--Column01--|--Column01--|
| 1     "brun/brune"   "brown"   |
| 2     "yellow"       "brown"   |

This shouldn´t work:

|--ID--|--Column01--|--Column01--|
|   1    "brun/brune"   "brown"  |
|   2    "brun/brune"   "brown"  |

Hope you can help me C: ~Henri


Solution

  • Since the question was asked in context of SQLiteStudio - you can create composite contraints in the table window. While you can add columns in upper part of the table window, the lower part of window is for managing composite constraints: enter image description here

    enter image description here enter image description here

    enter image description here