Jump to content

[SOLVED] Check if a table exists in a database


nathanblogs

Recommended Posts

# Returns details about a table. MySQL will return error 1146 when table does not exist.

describe put_table_name_here;

 

# Returns table names found in DB. You can then look through the rows to find if a particular table exists (or not).

show put_table_name_here;

 

 

Archived

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

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.