Sql
Links
TextQL - Allows you to easily execute SQL against structured text like CSV or TSV
arctype - The SQL client and database management tool that's fun to use
SQL Syntax and PDO Operations
Overview of SQL Commands and PDO Operations
Create Database
Drop Database
Create Table
Datatypes
Datatype | Description |
| Integer values |
| Decimal values |
| String with max number of characters |
| String with without set limit (max value of 65,535) |
| Year, month, and day |
| Year, month, day, hour, minute, and second |
| Datetime corresponding to UNIX epoch time |
Constraints
Constraint | Description |
| Unique identifier |
| Integer value is automatically added and incremented |
| Value must be unique |
| Value cannot be NULL |
| Initialized with default value |
Table vorhanden
Alter Table
Drop Table
Select Rows
Select Distint Rows
Joins
Join | Description |
| Returns only matches from both tables |
| Returns all entries from left table, and matches from right table |
| Returns all entries from right table, and matches from left table |
| Returns all entries from both tables |
Aggregate Functions
Function | Description |
| Counts number of rows |
| Adds all values |
| Find the smallest value |
| Find the largest value |
| Find the average value |
Conditions
Operator | Condition |
| Equal, not equal |
| Less than, greater than |
| Less/greater than or equal to |
| Within range of two values |
| Not within range of two values |
| Exists in list |
| Does not exist in list |
| Case insensitive equality comparison |
| Case insensitive inequality comparison |
| Matches a sequence of characters |
| Matches a single character |
| Value is null |
| Value is not null |
| If any values meet condition |
| If all values meet condition |
| If one or more records exist |
Insert Rows
Update Rows
Delete Rows
PDO
Open Connection
Datatypes
Datatype | Description |
| Represents a boolean data type |
| Represents the SQL NULL data type |
| Represents the SQL INTEGER data type |
| Represents the SQL CHAR, VARCHAR, or other string data type |
Select Rows
Insert Row
Update Row
Delete Row
MySQL Dump
MySQL Dump mit praxisnahen Beispielen einfach erklärt
Export
Import
Prefix for all tables
How to add prefix of all tables in mysql
Last updated