Hello,

Is there any way of restricting the values returned in MySql? For Example: There's a field in my table called points whihc I want to restrict from 0 to 17 only. This means the values more than 17 are unacceptable for field. Is there any way of implementing that?
Thanks

You need to add the CHECK CONSTRAINT to that field in the table.

Or make the field an enum type which allows only the predefined values.

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.