0% found this document useful (0 votes)
31 views1 page

SQL Cheatsheet

This document is a SQL cheatsheet outlining common SQL commands and their functions, such as SELECT, CREATE, DELETE, and UPDATE. It includes instructions on filtering data, combining tables, and using aggregate functions. Additionally, it provides examples of how to implement various SQL operations and statements.

Uploaded by

syedshayanjamal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
31 views1 page

SQL Cheatsheet

This document is a SQL cheatsheet outlining common SQL commands and their functions, such as SELECT, CREATE, DELETE, and UPDATE. It includes instructions on filtering data, combining tables, and using aggregate functions. Additionally, it provides examples of how to implement various SQL operations and statements.

Uploaded by

syedshayanjamal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 1
SQL CHEATSHEET Common Commands sevect as FROM WHERE J01N ‘AND oR UKE N IsNULL unr CASE ‘CREATE DROP UPDATE DELETE ALTER TABLE Create (HEATE OATABASE MyOatabase; Select data fom database Rename column or table with alias Specity table we're puling from Fiter query to match a condition Combine rows from 2 oF more tables Combine conditions in a query. All must be met Combine conditions in query. One must be met Search for patterns ina column Specity multiple values when using WHERE Return ooly rows with 2 NULL value Umit the numberof rows returned Return valve ona specified condition Create TABLE, DATABASE, INDEX o VIEW Delete TABLE, DATABASE, or NDEX Updete table data Delete rows from a table ‘Add/Remove colurns from table Group rows that have same values into summary rows Set order of result. Use DESC to reverse order ‘same as WHERE but used for aggregate functions Return sum of column Return average of column Return min vale af column Return max vale of column Count numberof rows Update Table Order of Ufone ourtabte Execution Strreaut= 5, WHERE coL2 = “sonathing Delete FROM WHERE GROUP BY HAVING Delete Records Add/Remove Column: SELECT ORDER BY umit Examples ee Seer aeons Seat aaietnnneectt Srenverree Seon ee eT Aggregate and iter rests Implementation of CASE statement

You might also like