Einführung MySQL¶
Data Definition Language (DDL)¶
CREATE Statement¶
CREATE DATABASE¶
CREATE DATABASE [IF NOT EXISTS] <name>;
CREATE TABLE¶
CREATE [TEMPORARY] TABLE [IF NOT EXISTS] <name> (
<column1> <type> [<attr1> <attr2> <...>]
);
CREATE PROCEDURE¶
DELIMITER //
CREATE PROCEDURE [IF NOT EXISTS] <name> (
[IN | OUT | INOUT] <param1> <type>,
[IN | OUT | INOUT] <param2> <type>,
...
) BEGIN
-- Do Stuff
END
DELIMITER ;
CREATE VIEW¶
DROP Statement¶
DROP Database¶
DROP DATABASE [IF EXISTS] <name>;
DROP Table¶
DROP [TEMPORARY] TABLE [IF EXISTS] <name>;
DROP Procedure¶
DROP PROCEDURE [IF EXISTS] <name>;
DROP VIEW¶
ALTER Statement¶
Platzhalter
Data Control Language (DCL)¶
GRANT Statement¶
REVOKE Statement¶
Data Manipulation Language (DML)¶
INSERT Statement¶
INSERT INTO <table> (<col1> [, <col2>, ...]) VALUES (<val1> [, <val2>, ...]);
UPDATE Statement¶
UPDATE <table> SET <col1> = <val1> [, <col2> = <val2>, ...] [WHERE <conditions>];
DELETE Statement¶
DELETE FROM <table> WHERE <conditions>;
SELECT INTO Statement¶
Data Query Language (DQL)¶
SELECT FROM Statement¶