Document
Document
The basic
syntax for creating a table is as follows:
```sql
...
);
```
- `data_type`: This defines the type of data that can be stored in the column
(e.g., `INT` for integers, `VARCHAR` for variable-length strings, `DATE` for
dates, etc.).
For example, if you wanted to create a table called `Students`, it might look
like this:
```sql
BirthDate DATE
);
```
The purpose of defining data types for columns is crucial for several reasons:
1. Data Integrity: Data types help ensure that the data stored in each column
is of the intended type. For example, if a column is defined as `INT`, the
database will not allow non-integer values to be inserted, which helps
maintain accurate and reliable data.