Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT 'TABEL' AS structure_name, count(*) as total
- FROM information_schema.tables
- WHERE table_type='BASE TABLE' and table_schema = '[GANTI_DENGAN_NAMA_DB]'
- UNION ALL
- SELECT 'VIEW' AS structure_name, count(*) as total
- FROM information_schema.tables
- WHERE table_type='VIEW' and table_schema = '[GANTI_DENGAN_NAMA_DB]'
- UNION ALL
- SELECT 'TRIGGER' AS structure_name, count(*) as total
- FROM information_schema.triggers WHERE TRIGGER_SCHEMA = '[GANTI_DENGAN_NAMA_DB]'
- UNION ALL
- SELECT 'FUNCTION_PROCEDURE' as structure_name, count(*) as total
- FROM INFORMATION_SCHEMA.ROUTINES
- WHERE ROUTINE_TYPE IN ('FUNCTION', 'PROCEDURE')
- AND ROUTINE_SCHEMA ='[GANTI_DENGAN_NAMA_DB]'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement