MySQL如何查询多少行,多少列

查找表中有多少列:

SELECT count(*)
FROM information_schema.COLUMNS
WHERE TABLE_SCHEMA=cpm888
AND table_name = deposit
# cpm888对应数据库名字, deposit对应表,原理是查出表中有多少个字段,一个字段对于一列

查找表中有多少行

SELECT count(*)
FROM deposit
# deposit 对应表名