Skip to main content
GameDev.net gamedev.net
🔒 Locked

[web] [MySQL] Query to get a table's definition?

Started by sanch3x Aug 24, 2009 at 12:35 PM 2 replies 4.5k views
Original Post
sanch3x
sanch3x
Hey, I do not have physical access to the machine with my database and I need to figure out the constraints on each columns of a specific table. I was able to pull out all the tables' names from the db but I can't seem to get more information. I was hoping the great minds around here might have a solution for me, google has failed me (or at least my keywords-picking-skills really suck). This is the only thing that comes close what I need, but as stated above, it only pulls out the table names and not their definitions. Thanks for any help :)
luciddeveloper
luciddeveloper
Once you have the table names you can run a "desc table_name" and that will return all of the column information. Not all users have desc permissions. But this should work for you.
sanch3x
sanch3x
Thanks I had tried it earlier and couldn't seem to get it to work with php but after some fiddling I got what I needed. :)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.