----- Original Message ----- From: "HELLBOY" > Hello all, > I want to know how to get information about field types. I am using MyISAM. > > I can see some MySQL instructions that can do this for one field at a time > but I want to get the > stats for a whole table at once. > > For example - > > How do I get information on each field of a table as to weather or not that > field can be null? > > And how do I get each data type for each of the fields in a table? > > I need the 'NOT NULL' / 'NULL' to force the administrator to allow access > to this field for users > who are permitted to add data items. > > I also need the data type so that I can associate validation REGEX with a > field type as the data > base is too broad to script individual field validations in php. > > Any pointers for REGEX for various MySQL data types would be greatly > appreciated as I have no real > experience with REGEX. > > Thanks all, Robert. > > > -------------------------------------- Hi, I think I have an answer. query for ur question is - 'DESCRIBE *tablename'*; just execute this query, It will return a resultset of field details for given table in the format-- *Field | Type | Null | Key | Default | Extra* It means u will have required information in resultset.
REgards, Rider. ------------------------------------- Hello HELLBOY, Thank you, absolutely perfect! Just one other thing would be helpful. Can anyone give me a link to information that describes the information returned in the fields 'KEY' and 'EXTRA'? Thanks all, Robert.