SQLize Online / PHPize Online

A A A
Share      Blog   Popular
Copy Format Clear
create table EMP_TBL(EMP_NAME varchar(300)); create table DEPT_TBL(DEPT_NAME varchar(300)); insert into EMP_TBL select concat('Name_',@num:=@num+1) from information_schema.tables a, (select @num:=-1) num; insert into DEPT_TBL select concat('Dept_',@num:=@num+1) from information_schema.tables a, (select @num:=-1) num; select * from INFORMATION_SCHEMA.TABLES limit 10; SELECT TABLE_SCHEMA AS DB_NAME ,TABLE_NAME ,SUM(TABLE_ROWS) AS Tbl_Count ,'' AS sample_1st_Row FROM INFORMATION_SCHEMA.TABLES WHERE 1=1 AND TABLE_NAME IN ('EMP_TBL','DEPT_TBL') GROUP BY TABLE_SCHEMA ,TABLE_NAME;
Stuck with a problem? Got Error? Ask ChatGPT!
Copy