I have a table with columns id,month,year,user_name,...etc in this table i want to make month,year and username unique.is it possible?IF it is ,please tell me, i required.

Recommended Answers

All 2 Replies

What database? For MySQL see here. Basically, it should look something like this, although you can specify more options:

CREATE UNIQUE INDEX MyIndex ON MyTable (month, year, username)

This is working.Thank you for your reply.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.