SQL View

View作成

create view view1 as
  (select
    id ,
    count(*) as id_count
  from
    test_db
  group by
    id);

view一覧取得

select TABLE_SCHEMA,TABLE_NAME from information_schema.tables where TABLE_TYPE = 'VIEW' and  TABLE_SCHEMA = '{データベース名}';