Category: MySQL

MySQL Transactions

MySQL Transactions Transaction statements are: START TRANSACTION, BEGIN, COMMIT, ROLLBACK and SET. To start a new transaction uses the keyword START TRANSACTION or BEGIN. COMMIT is used to make the current transaction changes. ROLLBACK is used to cancel the current transaction...

MySQL Indexes

MySQL Indexes There are three types of MySQL indexes: UNIQUE, FULLTEXT and SPATIAL. A UNIQUE index means that all values in the index must be distinct. FULLTEXT indexes are available only for InnoDB and MyISAM tables and can include columns with...

MySQL Functions and Operators

MySQL Function and Operator The most used MySQL Functions and Operators are: ABS() ADDDATE() ADDTIME() AES_DECRYPT() AES_ENCRYPT() AND, && ANY_VALUE() ASCII() = := AVG() BENCHMARK() BETWEEN … AND BIN() BINARY & ~ | ^ CASE CAST() CHAR() CHAR_LENGTH() CHARACTER_LENGTH() CHARSET() COALESCE()...

MySQL Data Types

MySQL Data Types MySQL supports several SQL data types like: numeric types, date and time types, string types, spatial types and JSON data type. Numeric Types INT SMALLINT TINYINT MEDIUMINT BIGINT DECIMAL NUMERIC FLOAT DOUBLE REAL BIT The keyword INT is...

MySQL Database

MySQL Database Create, use (set the current database) and drop MySQL database syntax and example. MySQL database syntax CREATE DATABASE database_name; USE database_name; DROP DATABASE database_name; Create database example CREATE DATABASE test; Set current database example USE test; Drop database example...