daily pastebin goal
55%
SHARE
TWEET

Untitled

a guest Sep 27th, 2017 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. /*drop table Person;
  3.  
  4. create table Person(
  5.     id int not null auto_increment,
  6.     primary key(id),
  7.     `name` varchar(30),
  8.     age int
  9.  
  10. );
  11.  
  12. insert into Person values
  13. (null, 'Mustermann',42),
  14. (null, 'Musterfrau',24),
  15. (null, 'Friedl',19);
  16.  
  17. select * from Person*/
  18.  
  19. /*drop table Essen;
  20.  
  21. create table Essen(
  22.     id int not null auto_increment,
  23.     primary key(id),
  24.     `Bezeichnung` varchar(50),
  25.     `Menge` varchar(30),
  26.     `Art`   varchar(30),
  27.     `KCAL`  int not null
  28. );
  29.  
  30. insert into Essen values
  31. (null,"Leberkässemmel","Stück","Essen",500),
  32. (null,"Spaghetti Bolognese", "Teller", "Essen", 595),
  33. (null,"Weißbier", "Halbe", "Trinken", 225),
  34. (null,"Avocado", "Stück", "Essen", 543),
  35. (null,"Laugenbrezel", "Stück", "Essen", 192),
  36. (null,"Cola", "kleine Flasche", "Trinken", 220);
  37.  
  38. -- select * from Essen
  39. */
  40. update Essen
  41. Set Bezeichnung = "Coca Cola"
  42. where Bezeichnung = "Cola";
  43.  
  44. --select * from Essen
  45.  
  46. delete from Essen where Bezeichnung = "Avocado";
  47.  
  48. --select * from Essen
  49.  
  50. insert into Essen values
  51. (null,"Croissant klein", "Stück", "Essen", 220);
  52.  
  53. select * from Essen
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top