Returns an escaped string suitable for use as a literal value in a SQL statement. It adds single quotes around the string and escapes special characters.
VARCHARDiperbarui: 13 Jun 2026QUOTE(str)The string to quote
1 SELECT QUOTE('Hello World') AS quoted;
Adds quotes around the string.
1 SELECT QUOTE("It's a test") AS escaped;
Escapes single quotes within the string.
1 SELECT CONCAT( 2 'INSERT INTO logs VALUES (', 3 QUOTE(user_input), 4 ')' 5 ) AS safe_sql 6 FROM user_data;
Builds SQL that is safe from injection attacks.
Sudah paham QUOTE? Latih langsung di browser
Latihan interaktif, langsung di browser.