数据库SQL实践49:针对库中的所有表生成select count(*)对应的SQL语句

思路:

列出数据库中所有表名:

select name from sqlite_master where type='table'

用||连接

"select count(*) from" || name || ";"从而实现连接

select "select count(*) from " || name || ";" as cnts
from sqlite_master where type = 'table';

学习啦

猜你喜欢

转载自blog.csdn.net/weixin_43160613/article/details/84869585