select case when 8240 8240 then 8240 else 8240 select 8240 from information_schema character_sets end

SQL CASE works in practically all SQL-Databases - Modern SQL

https://modern-sql.com/feature/case
... conditions. CASE works in MySQL, PostgreSQL, Oracle, SQL Server, DB2… ... Before closing the case expression with end , the optional else clause can be used. ... SELECT CASE WHEN id = 0 THEN 1/0 ELSE 1 END AS hit FROM demo  ...

MySQL 8.0 Reference Manual :: 12.4 Control Flow Functions - MySQL

https://dev.mysql.com/doc/refman/8.0/en/control-flow-functions.html
mysql> SELECT CASE 1 WHEN 1 THEN 'one' -> WHEN 2 THEN 'two' ELSE ' more' END; -> 'one' mysql> SELECT CASE WHEN 1>0 THEN 'true' ELSE 'false' ...

MySQL 5.7 Reference Manual :: 13.6.5.1 CASE Statement - MySQL

https://dev.mysql.com/doc/refman/5.7/en/case.html
The CASE statement cannot have an ELSE NULL clause, and it is terminated ... SELECT v; WHEN 3 THEN SELECT 0; ELSE BEGIN END; END CASE; END; |.

Exploit database error to leak users table informations ( writeup ...

https://hackernoon.com/exploit-database-error-to-leak-users-table-informations-writeup-be62b3c86968
15 Feb 2017 ... /?FilterThemes?tags[]=free&term=d%' AND (SELECT 1337 ... let me explain the sql query and how it works before we finish our exploit. ... select count(*), version () x from INFORMATION_SCHEMA.CHARACTER_SETS group by x ... retrieve the mysql version) and named it x and then we grouped by it.

CASE Statement - MariaDB Knowledge Base

https://mariadb.com/kb/en/case-statement/
CASE case_value WHEN when_value THEN statement_list [WHEN ... 2 THEN SELECT v; WHEN 3 THEN SELECT 0; ELSE BEGIN END; END CASE; END; |.

SQL injection cheat sheet | Web Security Academy - PortSwigger

https://portswigger.net/web-security/sql-injection/cheat-sheet
SELECT * FROM information_schema.columns WHERE table_name ... SELECT CASE WHEN (YOUR-CONDITION-HERE) THEN 1/0 ELSE NULL END.

Bacula-Web 5.2.10 - 'joblogs.php?jobid' SQL Injection - PHP ...

https://www.exploit-db.com/exploits/34851
2 Oct 2014 ... It is the end user's responsibility to obey all applicable local, state and federal laws. ... jobid=20874' RLIKE (SELECT (CASE WHEN (4767=4767) THEN 20874 ELSE 0x28 END)) ... FROM INFORMATION_SCHEMA.CHARACTER_SETS GROUP BY x)a) AND 'dams'='dams Type: UNION query Title: MySQL ...

MySQL CASE Function - W3Schools

https://www.w3schools.com/sql/func_mysql_case.asp
SELECT OrderID, Quantity, CASE WHEN Quantity > 30 THEN "The quantity is greater than 30" ... a value when the first condition is met (like an IF-THEN-ELSE statement). So, once a condition is true, it will stop reading and return the result.