Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions mysql-queries/find-storage-engine/script.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
-- specify the database
USE University;

-- find the engine of University.Student
-- using the information_schema.tables
SELECT engine
FROM information_schema.tables
WHERE table_schema = 'University'
AND table_name = 'Student';

-- find the engine of all the tables in University
-- using the information_schema.tables
SELECT table_name, engine
FROM information_schema.tables
WHERE table_schema = 'University'
AND table_type = 'BASE TABLE'
AND table_name = 'Student';

-- find the engine of University.Student
-- using the information_schema.tables
SHOW TABLE STATUS
FROM University
WHERE name = 'Student';