Show Menu
Cheatography

IHK SQL Cheat Sheet (DRAFT) by

IHK-Relevant SQL-Commands

This is a draft cheat sheet. It is a work in progress and is not finished yet.

DML

bar
baz
trei
baum
haus
nope
 

DDL

CREATE DATABASE IF NOT EXISTS db ;
ZXC
SHOW FIELDS FROM <Ta­bel­len­nam­e>;
 

DCL

CREATE USER 'usr'@'%' IDENTIFIED BY  'pas';
GRANT USAGE ON . TO 'usr'@'%';
GRANT ALL PRIVILEGES ON db . * TO 'usr'­­@'%';
oda so:


CREATE USER 'dbot'@'%' IDENTIFIED BY '*';

GRANT USAGE ON . TO 'dbot'@'%' IDENTIFIED BY '*' WITH MAX_QU­ERI­ES_­PER­_HOUR 0 MAX_CO­NNE­CTI­ONS­_PE­R_HOUR 0 MAX_UP­DAT­ES_­PER­_HOUR 0 MAX_US­ER_­CON­NEC­TIONS 0 ;

CREATE DATABASE IF NOT EXISTS
dbot
;

GRANT ALL PRIVILEGES ON
dbot
. * TO 'dbot'­@'%';