β
Basic SQL Commands Cheat Sheet ποΈ
β¦ SELECT β Select data from database
β¦ FROM β Specify table
β¦ WHERE β Filter query by condition
β¦ AS β Rename column or table (alias)
β¦ JOIN β Combine rows from 2+ tables
β¦ AND β Combine conditions (all must match)
β¦ OR β Combine conditions (any can match)
β¦ LIMIT β Limit number of rows returned
β¦ IN β Specify multiple values in WHERE
β¦ CASE β Conditional expressions in queries
β¦ IS NULL β Select rows with NULL values
β¦ LIKE β Search patterns in columns
β¦ COMMIT β Write transaction to DB
β¦ ROLLBACK β Undo transaction block
β¦ ALTER TABLE β Add/remove columns
β¦ UPDATE β Update data in table
β¦ CREATE β Create table, DB, indexes, views
β¦ DELETE β Delete rows from table
β¦ INSERT β Add single row to table
β¦ DROP β Delete table, DB, or index
β¦ GROUP BY β Group data into logical sets
β¦ ORDER BY β Sort result (use DESC for reverse)
β¦ HAVING β Filter groups like WHERE but for grouped data
β¦ COUNT β Count number of rows
β¦ SUM β Sum values in a column
β¦ AVG β Average value in a column
β¦ MIN β Minimum value in column
β¦ MAX β Maximum value in column
π¬ Tap β€οΈ for more!
Post #2031
3.02K

- β€ 9