Computer Science, asked by khyatikaushik75, 7 months ago


No two rows can contain same value in the ....
field.​

Answers

Answered by bhasvit18
3

Answer:

You can create a composite index on the user ID and content ID, and have a UNIQUE constraint on that index.

Let's assume you have a report table:

alter table report add unique index(user_id, content_id);

Now when you try to insert a record that duplicates a user and content id pair, you'll get an error which you can handle appropriately in your application code.

Explanation:

mark it brilliant

follow me

Answered by suribabu2334
0

Explanation:

you can create composite index on the user ID and constant ID and have a unique contrainst on that index

Similar questions