Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

MySql problem

Name: Anonymous 2010-07-22 6:10

Hi /prog/,

A MySQL noob needs some help here. I tried searching everywhere but it seems I cannot formulate my search expression correctly(English is not my first language). So the problem is. I want to limit the values that can be inserted in a column to certain possibilities. For example: I have a column phone_type and I want the only possible values there to be Work, Mobile, General and Fax. Any ideas? Sorry if this is too simple!

Name: Anonymous 2010-07-22 19:03

>>9
Easy way:
Put all your phone types in a single-column new table, create a primary key for it and add a foreign key constraint to the phone_type column.

You misspelled ``Incompetent way''.
The generous interpretation would be to assume you're trying to work around MySQL's inability to have regular constraints on columns, but MySQL also doesn't have foreign keys, so you're an idiot either way.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List