cheatsheet for sql

Solutions on MaxInterview for cheatsheet for sql by the best coders in the world

showing results for - "cheatsheet for sql"
Aksel
14 Jan 2018
1Guys, are you looking for SQL cheatsheet, in pdf format :)
2 -> https://buggyprogrammer.com/sql-cheatsheet/
Malena
20 Nov 2020
1# Finding Data Queries
2
3# SELECT: used to select data from a database
4SELECT * FROM table_name;
5
6# DISTINCT: filters away duplicate values and returns rows of specified column
7SELECT DISTINCT column_name;
8
9# WHERE: used to filter records/rows
10SELECT column1, column2 FROM table_name WHERE condition;
11SELECT * FROM table_name WHERE condition1 AND condition2;
12SELECT * FROM table_name WHERE condition1 OR condition2;
13SELECT * FROM table_name WHERE NOT condition;
14SELECT * FROM table_name WHERE condition1 AND (condition2 OR condition3);
15SELECT * FROM table_name WHERE EXISTS (SELECT column_name FROM table_name WHERE condition);
16
17# ORDER BY: used to sort the result-set in ascending or descending order
18SELECT * FROM table_name ORDER BY column;
19SELECT * FROM table_name ORDER BY column DESC;
20SELECT * FROM table_name ORDER BY column1 ASC, column2 DESC;
21SELECT TOP: used to specify the number of records to return from top of table
22SELECT TOP number columns_names FROM table_name WHERE condition;
23SELECT TOP percent columns_names FROM table_name WHERE condition;
24
25# Not all database systems support SELECT TOP. The MySQL equivalent is the LIMIT clause
26SELECT column_names FROM table_name LIMIT offset, count;
27
28# LIKE: operator used in a WHERE clause to search for a specific pattern in a column
29# % (percent sign) is a wildcard character that represents zero, one, or multiple characters
30# _ (underscore) is a wildcard character that represents a single character
31SELECT column_names FROM table_name WHERE column_name LIKE pattern;
32
33LIKE ‘a%’ # (find any values that start with “a”)
34LIKE%a’ # (find any values that end with “a”)
35LIKE%or%’ # (find any values that have “orin any position)
36LIKE ‘_r%’ # (find any values that have “r” in the second position)
37LIKE ‘a_%_%’ # (find any values that start with “a” and are at least 3 characters in length)
38LIKE ‘[a-c]%’ # (find any values starting with “a”, “b”, or “c”
39
40# See more in the source link
queries leading to this page
sql query examples cheatsheetsql cheat sheet for eginnerssql cheat sheet commandscheatsheet sqlsql cheat sheet pdf downloadsql syntax cheat sheetsql commands cheat sheetsql command cheatsheetsql programming cheat sheetdatabase cheat sheetsql server cheat sheetsql commands cheat sheet pdfsql statements cheat sheetsql query list cheat sheetsql cheatshetsql function cheat sheetsql cheat sheet looking at a tablecheat shee for sqlcheat sheet sqlcheasheet for sqlsql excel cheat sheetsql syntax cheat sgeetsql database cheatsheetsql basics cheat sheetbasic sql query cheatsheetsql injeciton cheat sheetdatabase sql cheat sheetsql server cheat sheet pdf 2020microsoft sql cheatsheetsql cheat shettsql cheatsheetcheat sheet for sql server commandscheat sheet for sqlms sql cheat sheetsql sheet cheatsadvanced sql cheat sheet pdfcheatsheet for sqlcheatsheet on sql full sql cheat sheet 5csql query syntax cheat sheetsql database cheat sheetsql operators cheat sheetmysql cheat sheetsql all queries cheat sheetsql functions cheat sheetcheat sheet for sql queriessql cheathseetsql keyword cheat sheetsql cheat sheecheat shet sql serversql basic cheat sheetsql all syntax cheat sheetsql cheatssql query commands cheat sheetsql cheat sheetsquery cheat sheetsql cheat sheet questionssql server query cheat sheetsql cheat sheetsql cheat sheatcheat sheet sql functionshow do i use sql cheat sheet 3fsql sheet cheatsql query cheat sheetquery sql cheatsheetst sql cheatsheetsql commands cheat sheet 2bpdfsql cli cheat sheetsql cheat sheet pdfhana sql sql cheatsheetsql cheat cheatsql cheatcheat sheet sql pdfcheat sheet for quories in sqlms sql cheatsheetsql condition cheat sheetsql tutorial cheat sheetsql server cheat sheet pdfsql queries cheat sheetsql table cheat sheet sql tutorial pdf cheatsheetsql cheat sheet for interviewsql tutorial sql cheat sheetcheat heet for sqlsql server command cheat sheettables in sql cheat sheetsql commands cheatsheetsql syntax cheat sheet 5csql command cheat sheetsql 22functions 22 cheat sheetsql language cheat sheetsql cheat cheetsql cheat cheatsql statement cheatsheetcreate table sql cheat sheetcheat sheet sql serversql query language cheat sheetcheatsheet sql queriescheatsheet for sql