查找表中有多少列:數據庫
SELECT count(*) FROM information_schema.COLUMNS WHERE TABLE_SCHEMA='cpm888' AND table_name = 'deposit' # 'cpm888'對應數據庫名字, 'deposit'對應表,原理是查出表中有多少個字段,一個字段對於一列
查找表中有多少行spa
SELECT count(*) FROM deposit # deposit 對應表名