use pm;
后我想看看PM中有多少表格?怎么写sql语句

解决方案 »

  1.   

    SHOW TABLES [FROM db_name] [like_or_where]

    以下摘自 MySQL 5.1 Reference Manual12.5.4.29. SHOW TABLES Syntax
    SHOW [FULL] TABLES [FROM db_name]
        [LIKE 'pattern' | WHERE expr]
    SHOW TABLES lists the non-TEMPORARY tables in a given database. You can also get this list using the mysqlshow db_name command. The LIKE clause, if present, indicates which table names to match. The WHERE clause can be given to select rows using more general conditions, as discussed in Section 23.27, “Extensions to SHOW Statements”. This statement also lists any views in the database. The FULL modifier is supported such that SHOW FULL TABLES displays a second output column. Values for the second column are BASE TABLE for a table and VIEW for a view. 
    [align=center]====  ====
    [/align]
      

  2.   


    select count(*) from information_schema.TABLES where table_schema = 'pm';
      

  3.   

    说information_schema.TABLES不存在啊
      

  4.   

    mysql5.0以上才有这个表,你用的是mysql什么版本