> For the complete documentation index, see [llms.txt](https://docs.creams-productions.nl/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.creams-productions.nl/help_vakken/notities/software-ontwikeling-avans/database-wip/alter.md).

# Alter

a description of sql alter Statement

***

## ALTER TABLE ADD

***

### syntax

```sql
ALTER TABLE TableName
ADD NewCollumName DataType;
```

***

### Example

```sql
ALTER TABLE customer
ADD Email varchar(255);
```

adds a collum Email to table customer

***

## ALTER TABLE DROP COLLOM

***

### syntax

```sql
ALTER TABLE tableName
DROP COLUMN CollumnName;
```

removes a collumn from a table

***

### Example

```sql
ALTER TABLE customers 
DROP COLUMN email;
```

removes column from table&#x20;

***

## ALTER RENAME COLUMN

***

### syntax

```sql
ALTER TABLE TableName
RENAME COLUMN OldName TO NewName
```

***

## ALTER COLUMN Datatype

***

### syntax

```sql
ALTER TABLE TableName
ALTER COLUMN ColumnName DataType;
```

the datatype speseficy what we would like to be stored in a collums fields\
for available Datatype check [datatype page](/help_vakken/notities/software-ontwikeling-avans/database-wip/datatypes-wip.md)
