SQLite Forum

Feature request: Stored Procedures
Login
I'll give you just one scenario to help you see that views and triggers are not always enough.  Consider stand-alone use to clear your mind from thoughts like "the application will do that for you".

A very simple example; two tables: `people` and `phones`.
(A person may have multiple phone numbers, hence the separate table.)

You want to insert a new person.

```
INSERT INTO people(pid,name,address) values(1,'First Last','Home');
INSERT INTO phones(pid,phone) values(1,'555-1212');
```

Each time you want to add a person you have to issue these two statements.
You could make a script, and edit the data before each run.

Or, play civilized and do something like:

`add_person(1,'First Last','Home','555-1212');`