[thelist] (SQL) Query with Multi FK's to the same lookup

Tab Alleman Tab.Alleman at MetroGuide.com
Wed May 19 12:47:43 CDT 2004

Hassan Schroeder wrote:
> Tab Alleman wrote:
>>> Frankly, if this were MySQL, at least, I'd redefine all the rating
>>> columns to ENUM('Poor','Fair','Average','Good','Excellent'); you'd
>>> use your existing numeric insert/update statements but would get a
>>> string back on selects...
>> Hard-coding like this isn't desirable in this case because if I ever
>> need to change "Excellent" to "Superior", for instance, I'd have to
>> change it in all my SQL queries instead of in the lookup table.
> Well, what I didn't say last time was that those terms shouldn't
> be considered user-visible "output" anyway, but just pointers to
> the *real* values.

Ah, I see.. But in that case, why not just use the integers as pointers?

More information about the thelist mailing list