| Goal | Each column should have the most appropriate data type. Developers sometimes misuse BIGINT, INTEGER, TEXT or VARCHAR type in places where a type that permits smaller values would be more appropriate and semantically descriptive. |
|---|---|
| Notes | Query returns also information about columns that properties have been specified through a domain. |
| Type | General Overview of some aspect of the database. |
| License | MIT (opens in new tab) |
| Fixing Suggestion | Change the data type or field size. If the type was selected with a perspective that values in the column will become quite big over time, then consider adding a CHECK constraint that further limits the values in the column. |
| Data Source | INFORMATION_SCHEMA only |
| SQL Query |
|
Collections
This query belongs to the following collections:
Find problems by overview
Queries that results point to different aspects of database that might have problems. A human reviewer has to decide based on the results as to whether there are problems or not .
| Name | Description |
|---|---|
| Find problems by overview | Queries that results point to different aspects of database that might have problems. A human reviewer has to decide based on the results as to whether there are problems or not . |
Categories
This query is classified under the following categories:
Data types
Queries of this category provide information about the data types and their usage.
| Name | Description |
|---|---|
| Data types | Queries of this category provide information about the data types and their usage. |
Further reading and related materials: