Jump to content

enums handle and capitalization (2 questions)


voodoochicken

Recommended Posts

1- how do you handle enums. for example, this is a piece of a command i used to create a table (with php):$def_sexo = "enum('M', 'F')";"create table (...)sexo $def_sexo,(...)"so if i did it right, one of the fields in the table only accepts values m and f. are those case sensitive, and how do i use them in a select and update, do i use '' or without '' 2- are field names and table names case sensitive?

Link to comment
Share on other sites

Case-sensitivity might depend on the DBMS, I'm not sure if that's defined in the SQL language or not. But it's always good to be consistent, so if you defined the values as M and F, then use M and F. If you want to use m and f then define the values as m and f. You do need to quote them.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...