以下の内容はhttps://end0tknr.hateblo.jp/entry/20130922/1379807850より取得しました。


mysqlでのテーブル/ビューの判定は、INFORMATION_SCHEMA.TABLESで

http://dev.mysql.com/doc/refman/5.1/en/tables-table.html
↑ここに書いてあるとおりですが、次のsqlで区別できます。

VIEWの場合

SELECT table_name, table_type FROM INFORMATION_SCHEMA.TABLES
  WHERE table_schema = 'test_db' and table_name LIKE 'test_view';
+------------+------------+
| table_name | table_type |
+------------+------------+
| test_view  | VIEW       |
+------------+------------+
1 row in set (0.00 sec)

TABLEの場合

SELECT table_name, table_type FROM INFORMATION_SCHEMA.TABLES
  WHERE table_schema = 'test_db' and table_name LIKE 'test_table';
+------------+------------+
| table_name | table_type |
+------------+------------+
| test_table | BASE TABLE |
+------------+------------+
1 row in set (0.00 sec)

単純にテーブルの存在を確認する場合

以下は、おまけです

show tables like '$table_name'



以上の内容はhttps://end0tknr.hateblo.jp/entry/20130922/1379807850より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14