Site Tools


webseite:mysql:basic

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
webseite:mysql:basic [2015/06/10 11:43] lunetikkwebseite:mysql:basic [2018/12/20 17:39] – Discussion status changed lunetikk
Line 18: Line 18:
 ===== Basics ===== ===== Basics =====
 ^  Code  ^  Function  ^ ^  Code  ^  Function  ^
- +|  CREATE TABLE Personal (Lastname CHAR(50) Firstname CHAR(50) Rank VARCHAR(30) Salary (INT));  |  Create table  |
-|  CREATE TABLE Personal (Lastname CHAR(50) Firstname CHAR(50) Rank VARCHAR(30) Salary (INT);  |  Create table  |+
 |  INSERT INTO Personal (Lastname, Firstname) VALUES ('Doe', 'John' |  Insert in table  | |  INSERT INTO Personal (Lastname, Firstname) VALUES ('Doe', 'John' |  Insert in table  |
 |  UPDATE Personal SET Salary=3200 WHERE Lastname = "Doe";  |  Change the salary of a person with the lastname Doe  | |  UPDATE Personal SET Salary=3200 WHERE Lastname = "Doe";  |  Change the salary of a person with the lastname Doe  |
Line 40: Line 39:
 |  UPDATE `DB`.`Table` SET `Cell1` = '$Var1' WHERE `Table`.`Cell2`='$Var2'  |  update Table Cell2 to Var2 where Cell1 is Var1  | |  UPDATE `DB`.`Table` SET `Cell1` = '$Var1' WHERE `Table`.`Cell2`='$Var2'  |  update Table Cell2 to Var2 where Cell1 is Var1  |
 |  INSERT INTO Table (Cell1, Cell2) VALUES ('Text', '$Var1' |  add new row into Table with cell1 as Text and Cell2 as Var1  | |  INSERT INTO Table (Cell1, Cell2) VALUES ('Text', '$Var1' |  add new row into Table with cell1 as Text and Cell2 as Var1  |
 +
 +\\
 +\\
 +~~DISCUSSION:off~~
webseite/mysql/basic.txt · Last modified: 2018/12/20 17:40 by lunetikk