\documentclass[10pt,a4paper]{article} % Packages \usepackage{fancyhdr} % For header and footer \usepackage{multicol} % Allows multicols in tables \usepackage{tabularx} % Intelligent column widths \usepackage{tabulary} % Used in header and footer \usepackage{hhline} % Border under tables \usepackage{graphicx} % For images \usepackage{xcolor} % For hex colours %\usepackage[utf8x]{inputenc} % For unicode character support \usepackage[T1]{fontenc} % Without this we get weird character replacements \usepackage{colortbl} % For coloured tables \usepackage{setspace} % For line height \usepackage{lastpage} % Needed for total page number \usepackage{seqsplit} % Splits long words. %\usepackage{opensans} % Can't make this work so far. Shame. Would be lovely. \usepackage[normalem]{ulem} % For underlining links % Most of the following are not required for the majority % of cheat sheets but are needed for some symbol support. \usepackage{amsmath} % Symbols \usepackage{MnSymbol} % Symbols \usepackage{wasysym} % Symbols %\usepackage[english,german,french,spanish,italian]{babel} % Languages % Document Info \author{Kemmojoo} \pdfinfo{ /Title (mysql.pdf) /Creator (Cheatography) /Author (Kemmojoo) /Subject (MySQL Cheat Sheet) } % Lengths and widths \addtolength{\textwidth}{6cm} \addtolength{\textheight}{-1cm} \addtolength{\hoffset}{-3cm} \addtolength{\voffset}{-2cm} \setlength{\tabcolsep}{0.2cm} % Space between columns \setlength{\headsep}{-12pt} % Reduce space between header and content \setlength{\headheight}{85pt} % If less, LaTeX automatically increases it \renewcommand{\footrulewidth}{0pt} % Remove footer line \renewcommand{\headrulewidth}{0pt} % Remove header line \renewcommand{\seqinsert}{\ifmmode\allowbreak\else\-\fi} % Hyphens in seqsplit % This two commands together give roughly % the right line height in the tables \renewcommand{\arraystretch}{1.3} \onehalfspacing % Commands \newcommand{\SetRowColor}[1]{\noalign{\gdef\RowColorName{#1}}\rowcolor{\RowColorName}} % Shortcut for row colour \newcommand{\mymulticolumn}[3]{\multicolumn{#1}{>{\columncolor{\RowColorName}}#2}{#3}} % For coloured multi-cols \newcolumntype{x}[1]{>{\raggedright}p{#1}} % New column types for ragged-right paragraph columns \newcommand{\tn}{\tabularnewline} % Required as custom column type in use % Font and Colours \definecolor{HeadBackground}{HTML}{333333} \definecolor{FootBackground}{HTML}{666666} \definecolor{TextColor}{HTML}{333333} \definecolor{DarkBackground}{HTML}{ED850E} \definecolor{LightBackground}{HTML}{FDF7EF} \renewcommand{\familydefault}{\sfdefault} \color{TextColor} % Header and Footer \pagestyle{fancy} \fancyhead{} % Set header to blank \fancyfoot{} % Set footer to blank \fancyhead[L]{ \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{C} \SetRowColor{DarkBackground} \vspace{-7pt} {\parbox{\dimexpr\textwidth-2\fboxsep\relax}{\noindent \hspace*{-6pt}\includegraphics[width=5.8cm]{/web/www.cheatography.com/public/images/cheatography_logo.pdf}} } \end{tabulary} \columnbreak \begin{tabulary}{11cm}{L} \vspace{-2pt}\large{\bf{\textcolor{DarkBackground}{\textrm{MySQL Cheat Sheet}}}} \\ \normalsize{by \textcolor{DarkBackground}{Kemmojoo} via \textcolor{DarkBackground}{\uline{cheatography.com/28261/cs/8308/}}} \end{tabulary} \end{multicols}} \fancyfoot[L]{ \footnotesize \noindent \begin{multicols}{3} \begin{tabulary}{5.8cm}{LL} \SetRowColor{FootBackground} \mymulticolumn{2}{p{5.377cm}}{\bf\textcolor{white}{Cheatographer}} \\ \vspace{-2pt}Kemmojoo \\ \uline{cheatography.com/kemmojoo} \\ \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Cheat Sheet}} \\ \vspace{-2pt}Published 30th May, 2016.\\ Updated 30th May, 2016.\\ Page {\thepage} of \pageref{LastPage}. \end{tabulary} \vfill \columnbreak \begin{tabulary}{5.8cm}{L} \SetRowColor{FootBackground} \mymulticolumn{1}{p{5.377cm}}{\bf\textcolor{white}{Sponsor}} \\ \SetRowColor{white} \vspace{-5pt} %\includegraphics[width=48px,height=48px]{dave.jpeg} Measure your website readability!\\ www.readability-score.com \end{tabulary} \end{multicols}} \begin{document} \raggedright \raggedcolumns % Set font size to small. Switch to any value % from this page to resize cheat sheet text: % www.emerson.emory.edu/services/latex/latex_169.html \footnotesize % Small font. \begin{multicols*}{4} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{SELECT}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{SELECT {[}ALL | DISTINCT{]} \{* | spaltenliste | funktion\} \newline FROM \{tabellenname {[}AS{]} {[}tabellenalias{]} | viewname {[}AS{]} {[}tabellenalias{]}\} WHERE auswahlbedingung \newline {[}GROUP BY spaltenliste {[}HAVING auswahlbedingung{]} {]} \newline {[}ORDER BY spalte {[}ASC | DESC{]} {[},spalte2 {[}ASC | DESC{]}… {]};} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Bedingung spaltenname}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Bedingung spaltenname vergleichsoperator wert} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Spaltenliste}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{Spaltenliste spaltenname {[}{[}AS{]} spaltenalias{]} \newline {[},spaltename 2 {[}{[}AS{]} spaltenalias{]}{]}…} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{SELECT spaltenliste}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{SELECT spaltenliste \newline FROM tabellenname1 \newline NATURAL JOIN tabellenname2;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{SELECT spaltenliste}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{SELECT spaltenliste \newline FROM tabellenname1 {[}tabellenalias{]} \newline {[}{[}INNER | \{LEFT | FULL | RIGHT {[}OUTER{]}\}{]} JOIN tabellenname2 {[}tabellenalias{]} ON tabellenname1.spaltename = tabellenname2.spaltenname{]}…;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{SELECT spaltenliste}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{SELECT spaltenliste \newline FROM tabellenname1 \{UNION | INTERSECT | MINUS\} \newline SELECT spaltenliste \newline FROM tabellenname2} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{SELECT spaltenliste}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{SELECT spaltenliste \newline FROM tabellenname1 {[}{[}INNER | \{LEFT | RIGHT {[}OUTER{]}\}{]} JOIN tabellenname2 \newline USING (spaltename){]}…;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Wertzuweisungen}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{ziel := wert; \newline SELECT spalte \newline INTO ziel \newline FROM ……. \newline {[}WHERE……{]};} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Tabellen {\"a}ndern}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{ALTER TABLE tabellenname \newline \{ADD \{spaltendefinition | constraint\} \newline | DROP \{spaltenname | constraintname\} \newline | MODIFY spaltenname spaltendefinition \newline | MODIFY CONSTRAINT constraintname constraintRegel \newline | RENAME COLUMN spaltennameAlt TO SplatennameNeu \};} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{INSERT}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{INSERT INTO tabellenname \newline (spaltenname1, spaltenname2… ) \newline VALUES (wert1, wert2… );} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{UPDATE}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{UPDATE tabellenname \newline SET spaltenname = wert {[}, spaltenname2 = wert{]}… \newline {[}WHERE auswahlbedingung{]};} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{DELETE}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{DELETE tablennename \newline WHERE auswahlbedingung;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{CREATE TABLE}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{CREATE TABLE tabellenname( \newline spaltendefinition \newline {[}, spaltendifinition2{]}… \newline {[}CONSTRAINT constraintname \newline \{PRIMARY KEY (spaltenliste) \newline | FOREIGN KEY (spaltenliste) REFERENCES tabellenname{[}(spaltenliste){]} \newline | CHECK (bedingung)\}{]}… );} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{CREATE {[}OR REPLACE{]} VIEW}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{CREATE {[}OR REPLACE{]} VIEW viewname \newline {[}(spaltenalias {[}, spaltenalias\_n{]}… ){]} \newline AS abfrage} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{CREATE SEQUENCE}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{CREATE SEQUENCE sequenzname \newline {[}START WITH anfangswert{]} \newline {[}INCREMENT BY wert{]};} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{CREATE {[}UNIQUE{]} INDEX}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{CREATE {[}UNIQUE{]} INDEX indexname \newline ON tabellenname (spaltenname1{[}ASC | DESC{]} {[}, spaltenname2 {[}ASC | DESC{]}{]}…);} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{CREATE {[}OR REPLACE{]} TRIGGER}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{CREATE {[}OR REPLACE{]} TRIGGER triggername \newline \{BEFORE | AFTER\} \newline \{DELETE | INSERT | UPDATE {[}OF spaltenliste{]}\}… ON tabellenname \newline FOR EACH ROW \newline {[}WHEN (bedingung){]} \newline {[}DECLARE \newline bezeichner datentyp; {[}…{]}{]} \newline BEGIN anweisungen; \newline END;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Spaltendefinition}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{spaltenname datentyp {[}NOT NULL | DEFAULT wert{]} \newline | UNIQUE | PRIMARY KEY \newline | REFERENCES tabellenname {[}(spaltenname){]} \newline {[}ON DELETE CASCADE{]} | CHECK (bedingung)} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Bedingung Verneinen}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{NOT} \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Bedingungen verknüpfen}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{AND} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{OR} \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Datumsfunktionen}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{CURRENT\_DATE} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{SYSDATE} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{EXTRACT (\{DAY | MONTH | YEAR\} FROM datumswert)} \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Constraint auf Spaltenebene}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{NULL} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{NOT NULL} \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Vergleichsoperatoren}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{\textless{}, \textless{}=, \textgreater{}, \textgreater{}=, =, \textless{}\textgreater{}} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{LIKE} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{IN} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{IS NULL, IS NOT NULL} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{BETWEEN wert1 AND wert2} \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Mathematische Operatoren}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{* /} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{+ -} \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Zeichenketten verbinden}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{||} \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Wildcards für LIKE (Oracle, Standard)}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{\%, \_} \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Bedingungen bei Unterabfragen}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{mit einem Ergebnis: =, !=, \textless{}, \textgreater{}, \textless{}=, \textgreater{}=} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{mit mehrzeiligem Ergebnis: IN, EXISTS, ALL, ANY} \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Constraints auf Tabellenebene}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{UNIQUE} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{PRIMARY KEY} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{FOREIGN KEY} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{REFERENCES} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{CHECK} \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Datentypen (Auszug)}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{INTEGER, SMALLINT, NUMBER(n1,m), DECIMAL(n,m)} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{CHAR(anzahl), VARCHAR(anzahl)} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{DATE, TIMESTAMP} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{TEXT, CLOB, BLOB} \tn % Row Count 4 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Aggregatfunktionen}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{SUM(spaltenname)} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{MIN(spaltenname)} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{MAX(spaltenname)} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{AVG(spaltenname)} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{COUNT(\{* | ({[}DISTINCT{]}spaltenname\})} \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Zeichenkettenfunktionen}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{UPPER(spaltename)} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{LOWER(spaltenname)} \tn % Row Count 2 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Mathematische Funktionen}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{MOD(dividend, divisor)} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{ABS(ausdruck)} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{POWER(basis,exponent)} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{SQRT(ausdruck)} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{ROUND(ausdruck{[}nachkommastellen{]})} \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Konvertierungsfunktionen}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{TO\_CHAR(ausdruck)} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{TO\_NUMBER(ausdruck,formatstring)} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{TO\_DATE(datum,formatstring)} \tn % Row Count 3 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{L{\"o}schen im Datenbankschema}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{DROP TABLE tabellenname {[}CASCADE CONSTRAINTS{]};} \tn % Row Count 1 (+ 1) % Row 1 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{DROP INDEX indexname;} \tn % Row Count 2 (+ 1) % Row 2 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{DROP SEQUENCE sequenzname;} \tn % Row Count 3 (+ 1) % Row 3 \SetRowColor{white} \mymulticolumn{1}{x{3.833cm}}{DROP TRIGGER triggername;} \tn % Row Count 4 (+ 1) % Row 4 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{DROP VIEW viewname;} \tn % Row Count 5 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{IF-Anweisung}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{IF bedingung \newline THEN \newline anweisungen; \newline {[}ELSE \newline anweisungen;{]} \newline END IF;} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Else If-Anweisung}} \tn \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{ELSIF bedingung \newline anweisungen} \tn \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} \begin{tabularx}{3.833cm}{X} \SetRowColor{DarkBackground} \mymulticolumn{1}{x{3.833cm}}{\bf\textcolor{white}{Verhindern von Änderungen mit Fehlermeldung}} \tn % Row 0 \SetRowColor{LightBackground} \mymulticolumn{1}{x{3.833cm}}{\seqsplit{raise\_application\_error(errornummer2}, errortext3);} \tn % Row Count 1 (+ 1) \hhline{>{\arrayrulecolor{DarkBackground}}-} \end{tabularx} \par\addvspace{1.3em} % That's all folks \end{multicols*} \end{document}