M
M
misc12014-10-08 20:43:35
MySQL
misc1, 2014-10-08 20:43:35

How to avoid duplicates?

There are several columns, number (number) and tag (category). How to compose an INSERT so that number cannot be subscribed to tag multiple times?
(Not allowed:
NUMBER | TAG
+79000000000 1
+79000000000 1
+79000000000 1
Allowed:
+79000000000 2
+79000000000 7
+79000000000 8)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
deleted-tnorman, 2014-10-08
@deleted-tnorman

Immediately initialize the base for all numbers, and change only the value?

V
Vit, 2016-11-01
@fornit1917

Set up pg_hba.conf, create users, give permissions, etc.
https://wiki.postgresql.org/wiki/Client_Authentication
https://www.postgresql.org/docs/9.6/static/auth-me...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question