Question

Basically just as the title says, in MySQL can I specify a specific range of values for a column so a choice can be selected when a record is added.

I am only starting to understand MySQL and I know that you can do this MS-Access. I'm not sure but do I have to put something special in the 'Length/Values' column when designing? If I can do it, where do I specify what values would be selectable?

If not, is there a more efficient work around then creating a new table and relating the specified values as a foreign key.

Cheers

Was it helpful?

Solution

MS Access combines a few functionalities into a single program:

  • A database engine (MS Jet)
  • A programming environment with a programming language (VBA)
  • A table editor
  • A table data editor
  • A form editor
  • A report editor
  • A query editor
  • ... more

MySQL is a database engine only. So there is no natural "Select Box" to input data. This would need to come from your programming environment or form generator.

That said, there is support for such a data type: Use ENUM - e.g. CREATE TABLE test (saluation ENUM ('Mr.', 'Mrs.'));

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top