DROP DATABASE kunde;
CREATE USER 'frank'@'localhost' IDENTIFIED BY 'wert123!';
DROP USER 'frank'@'localhost'; DROP DATABASE IF EXISTS `frank`;
SHOW DATABASES;
CREATE DATABASE kunde;
USE kunde;
SHOW TABLES;
DESC <tabellen_name>;
ALTER DATABASE kunde DEFAULT CHARACTER SET latin1 COLLATE latin1_german2_ci;
GRANT ALL PRIVILEGES ON kunde . * TO 'frank'@'localhost';
CREATE TABLE `kunde`.`Name` ( `Kundennummer` TINYINT UNSIGNED NOT NULL AUTO_INCREMENT , `Anrede` TINYTEXT NOT NULL , `Vorname` TINYTEXT NOT NULL , `Name` TINYTEXT NOT NULL , `Geburtsdatum` DATETIME NOT NULL , `Telefonnummer` TINYTEXT NOT NULL , PRIMARY KEY (`Kundennummer`)) ENGINE = InnoDB;
CREATE TABLE kunde.adresse ( Strasse_1 TINYTEXT NOT NULL, Strasse_2 TINYTEXT NOT NULL, PLZ TINYTEXT NOT NULL, Ort TINYTEXT NOT NULL, Land TINYTEXT NOT NULL) ENGINE = INNODB;
DELETE FROM `table 2` WHERE `table 2`.`Kundennummer` = 7;
SELECT * FROM `table 2`;
SELECT * FROM `name` WHERE Kundennummer = 4;
DELETE FROM `name` WHERE `name`.`Kundennummer` = 4;