4
votes
Fortnightly Programming Q&A Thread
General Programming Q&A thread! Ask any questions about programming, answer the questions of other users, or post suggestions for future threads.
Don't forget to format your code using the triple backticks or tildes:
Here is my schema:
```sql
CREATE TABLE article_to_warehouse (
article_id INTEGER
, warehouse_id INTEGER
)
;
```
How do I add a `UNIQUE` constraint?
Instead of a
UNIQUE
constraint I'd just make a multi-column primary key, which would achieve the same result. In postgresql it would look like this:Just as an FYI; this is a recurring thread that contains the question as an example in each post. The question is there to illustrate the format to use for posting questions.
I realized that was probably the case as I was typing, but figured I've already come this far and the thread is empty anyway, might as well commit to it.