SQL API Reference - Alter Procedure

Introduction

This page provides information on how to use the alter procedure to modify existing data in SQL databases.

The alter procedure allows you to change the schema of a table, add columns, modify data types, or drop constraints.

This page starts with an overview of the alter procedure.

Overview

Key Features

- Schema Modification: Modify table schemas, including adding or removing columns, creating/dropping indexes, etc.

- Data Manipulation: Change data types, update values, and perform data transformations.

- Constraint Management: Modify constraints, such as primary keys, foreign keys, and unique constraints.

- Simplified Syntax: Provides a cleaner and more intuitive syntax compared to older methods.

Example Usage - Alter Procedure

Let's imagine we have a table called 'customers' with columns 'id', 'name', and 'email'. We want to add a new column, 'phone_number'. Use the alter procedure to achieve this.

First, we need to execute the alter procedure to create the new column.

Then we need to update the columns of the existing records of the table.

User Interface (Conceptual)

The user interface would allow to easily select a table, enter a new column name, and select an appropriate SQL statement. A simplified syntax should guide the user.