SQL course

SQL Level 12: Security

Security is level 12 of 15 of the LoWisa SQL course. It has 3 lessons and 9 ideas. Below is every lesson and what it teaches, in one line each.

Updated 2026-11-16

Users, Roles and Permissions

  • Least privilege. Applications connect as roles holding only needed rights: the reporting user cannot DELETE, by construction.
  • GRANT and REVOKE. GRANT gives a role specific rights on specific objects; REVOKE takes them back: permissions as code.
  • Row-level security. Row-level security filters every query by policy: tenants isolated inside one table, enforced by the engine.

SQL Injection Awareness

  • The attack. Injection is user text concatenated into SQL until it becomes SQL: the classic drop-table postcard.
  • Parameterised queries. Parameters separate code from data: the query is compiled with placeholders, values arrive untouched.
  • Never build SQL from strings. The rule is absolute: user input never concatenates into a statement: no exceptions, no escaping heroics.

Secure Database Access

  • Secrets and connections. Credentials live in secret stores, connections are encrypted, and the database never faces the open internet.
  • Auditing access. Sensitive tables get access logging: who read what, kept where the reader cannot edit it.
  • Backups as security. Tested backups are ransomware defence: an untested backup is a hope, not a control.

Before and after this level

In the app each of these ideas is taught and then asked back, and the level ends with a checkpoint and flashcards. See Checkpoints and flashcards.

Frequently asked questions

What does SQL Level 12: Security cover?

Users, Roles and Permissions, SQL Injection Awareness, Secure Database Access: 3 lessons and 9 ideas.

What should I know before this level?

The level before it, Level 11: Advanced SQL, which covers Recursive Queries, Advanced Grouping and Set Operations, Complex Relational Patterns.

Learn SQL on your phone

The first level is free. LoWisa is on Google Play and the App Store.