Image may be NSFW.
Clik here to view.At times we want to find if a tables exists in a database.The snippet below shows how this can be done.
It open a db connection or reuse an already db connection, then selects the given database and finally executes a sql to find out whether the table exists or not.