IndianZ Logo

About Blog Cheatsheets Defense Links Offense
Cheatsheets
ASCII Bing Boolean BrowserspyClient BrowserspyServer Certifications Chat Chmod DuckDuckGo Encoding Frequency Spectrum Gdb Google HTTP HTTP Errors ICMP IPv4 IPv6 IRC NetBIOS OSI Model Protocols RegEx SQL Tagging Tcpdump TCP/UDP Vi

SQL

Statement Description
SELECT query data
SELECT * FROM table X;
UNION combine result for two or more questions
SELECT * FROM table X UNION SELECT * FROM table Y;
AS display results as other name than column name
SELECT * AS lol FROM table X;
WHERE return data matching specific condition
SELECT * FROM table X WHERE username='lol';
LIKE return data matching a wildcard condition (%)
SELECT * FROM table WHERE username LIKE %lol%;
UPDATE update a column in all matching rows with a new value
UPDATE table set username='lol' WHERE username='none';
INSERT insert rows of data into a table
INSERT INTO users (username,userage) VALUES ('lol','25');
DELETE delete all rows of data matching a condition from the table
DELETE FROM users WHERE username='lol';
EXEC execute command
EXEC xp_cmdshell {command}
DROP drops a table
DROP TABLE test;