I’m trying to query the comments on a table by this query:
SELECT table_comment FROM information_schema.tables WHERE table_name = 'myspecifiedname'
But it doesn’t seem to work. Any ideas?
What’s this for: I’m storing a ‘nice name’ of the tables (tables are items in the system) without _ and with ( and ) and – characters that if I included them in my table names these chars would mess them up. Or I should just create my own table for these kind of ‘settings’ and table name and nice name pairs? That seems so manual. Entering the nice name to the comments field is so easy..
Firsh, what is the MySQL error that is being returned (or just zero rows)?
It is working for me perfectly. I am running MySQL 5.0.77
Well it appears my query was good, the result fetching had an error. I ran the query in SQL maestro and checked the column name (table_comment). For some reason I wasn’t using this when outputting the result. My bad. But thanks for the confirmation that I did it right (I couldn’t find a useful page via google..) I was just tired and overlooked something. Somebody please close the thread.