Skip to content

Instantly share code, notes, and snippets.

@koobitor
Last active March 31, 2020 21:36
Show Gist options
  • Save koobitor/7d4578e9f1dec3d0740fa622c1a37a83 to your computer and use it in GitHub Desktop.
Save koobitor/7d4578e9f1dec3d0740fa622c1a37a83 to your computer and use it in GitHub Desktop.
-- DB Schema
SELECT COLUMN_NAME, COLUMN_TYPE, IS_NULLABLE, EXTRA, COLUMN_DEFAULT, COLUMN_COMMENT, COLUMN_KEY from information_schema.columns
WHERE table_schema = 'database_name'
AND table_name = 'table_name';
-- Example Data
SELECT * FROM table_name LIMIT 10;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment