IndianZ Logo

About Cheatsheets Defense Links Offense
Cheatsheets
Arduino ASCII Bing Boolean BrowserspyClient BrowserspyServer Certifications Chat Chmod DuckDuckGo Encoding Frequency Spectrum Gdb Google HAM HTTP HTTP Errors ICMP IPv4 IPv6 IRC NetBIOS OSI Model Powers/Fractions Protocols Raspberry Pi RegEx Resistor/Capacitor SQL Tagging Tcpdump TCP/UDP Teensy Unit System 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;