The following four canonical CRUD operations map directly to SQL language statements:
- Creation is done via the INSERT statement.
- Retrieval is done via the SELECT statement.
- Update is done via the UPDATE statement. Some SQL dialects also include a REPLACE statement.
- Deletion is done via the DELETE statement.
We have to note that we'll often look at literal SQL syntax with all values supplied. This is separate from SQL syntax with binding variable placeholders instead of literal values. The literal SQL syntax is acceptable for scripts; it is perfectly awful for application programming. Building literal SQL statements in an application involves endless string manipulation and famous security problems. ...