You are on page 1of 1
SQL Cheat Sheet: Basics - SELECT, INSERT, UPDATE, DELETE, COUNT, DISTINCT, LIMIT Skills Network Command Syntax SELECT SELECT column, colunn2, FROM seble_nones WHERE SELECr colunmt, coluend, -..F80" COUNT setecr counr * FROM table_pane : DISTINCT setscr o1STINCT colunnnare FROM LIMIT setzcr * Row tabte pene exmrT INSERT ansiRr 70 sable_nane (colunescolsan2,coluned...) \vaLues(valvet,walue2,value3. 35 UPDATE UPDATE tabte_nane SET[ {cote ]= IVALUES]} MERE [condition] DELETE DELETE FAO" cable_nane WERE Author(s) Malic Single Changelog Date 2021-07-27 10 Malika Initial Version Description cr statement is used to feteh data from a database, Wine clause is used to extract only those racords that full spectiag condition, coun is 2 function that takes the name ‘of a column as argument and counts ‘the number of rows when the column ‘snot NULL bisriner function is used to specity ‘thatthe statement i a query which ‘returns unique values in specified «columns. Lorri a clause to spect the maximum number of rows the result set must have Inch is used to insert new rows in the table, L?0sTe used to update the rows in the table Te statement is used to remove tows from the table which ae specified Jn the WHERE condition Version Changed by Change Description Example strporte*pearson' (are sy98,<$¢y, county, a8rp0°t) 3", Pearson’): DELETE FROM placeofSnterest WERE celty IN (Rone, Wlerna") n

You might also like