This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
webseite:mysql:basic [2014/05/27 14:49] – created lunetikk | webseite:mysql:basic [2014/06/02 10:03] – lunetikk | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== MySQL Basics ====== | ====== MySQL Basics ====== | ||
+ | ==== Data Definition Language (DDL) ==== | ||
+ | |||
+ | ^^^ | ||
+ | | CREATE | ||
+ | | ALTER | alters / change the structure of the db | | ||
+ | | DROP | delete objects from the db | | ||
+ | |||
+ | ==== Data Manipulation Language (DML) ==== | ||
+ | |||
+ | ^^^ | ||
+ | | SELECT | ||
+ | | INSERT | ||
+ | | UPDATE | ||
+ | | DELETE | ||
+ | |||
+ | ===== Code examples ===== | ||
^Code^What it does^ | ^Code^What it does^ | ||
| SELECT * FROM Table WHERE Cell LIKE ' | | SELECT * FROM Table WHERE Cell LIKE ' | ||
+ | | SELECT IdX FROM Table WHERE Cell LIKE ' | ||
+ | | SELECT * FROM Table ORDER BY IdX DESC LIMIT 0,10 | select all rows limited by 10, order everything by IdX and from newest top to oldest bottom | ||
+ | | SELECT * FROM Table WHERE Cell LIKE ' | ||
+ | | UPDATE `DB`.`Table` SET `Cell1` = ' | ||
+ | | INSERT INTO Table (Cell1, Cell2) VALUES (' |