15 lines
367 B
MySQL
15 lines
367 B
MySQL
![]() |
-- Check if table exists
|
||
|
SELECT EXISTS (
|
||
|
SELECT FROM information_schema.tables
|
||
|
WHERE table_schema = 'public'
|
||
|
AND table_name = 'businesses'
|
||
|
);
|
||
|
|
||
|
-- Check table structure
|
||
|
SELECT column_name, data_type, is_nullable
|
||
|
FROM information_schema.columns
|
||
|
WHERE table_schema = 'public'
|
||
|
AND table_name = 'businesses';
|
||
|
|
||
|
-- Check row count
|
||
|
SELECT count(*) FROM businesses;
|