UNIQUE Constraint makes sure all values in a column are exclusive. PRIMARY KEY Constraint also had the same property as UNIQUE Constraint. But there are some differences. In a table only one PRIMARY KEY Constraint
Month: January 2022
CHECK Constraint MySQL
A CHECK constraint is used to control or limit the value of a particular column of the table. Every time CHECK constraint ensures to match a particular condition of inserted value. Before MySQL version 8..0.16,
MYSQL FOREIGN KEY CONSTRAINT
FOREIGN KEY is used to relate two or more tables together. Basically, it produces a parent-child relationship. The parent table consists of a PRIMARY KEY. And another table that keeps the reference of the parent
MySQL PRIMARY KEY CONSTRAINT
PRIMARY KEY:- A PRIMARY KEY constraint uniquely identifies each row of the table. A PRIMARY KEY can not be a NULL value. Each table has only one PRIMARY KEY and each table column can have
MySQL Constraint
MySql Constraint Syntax:- Constraints have specified the rule of data that will store in a database table. That means constraints will allow or restrict what value of data will store in the table. So, constraints
MySQL TIMESTAMPDIFF Function
MySQL TIMESTAMPDIFF() function returns the difference or subtractions of a given two date-time. Syntax of TIMESTAMPDIFF(unit, timestamp_exp1, timestamp_exp2 ) Here unit may be FRAC_SECOND (microseconds), SECOND, MINUTE, HOUR, DAY, WEEK, MONTH, QUARTER, or YEAR. timestamp_exp1
Load Data Statement in MySQL
LOAD DATA and INSERT statements in MySQL are used for populating records into MySQL tables. LOAD DATA populates record in bulk But INSERT statement populates record in a single row. mysql> LOAD DATA LOCAL INFILE
MYSQL JOINS
Joining is an important part of SQL queries. Since MySQL is an RDMS, So it also supports JOIN. Here I am putting some knowledge about MySql joining. It is based on my understanding. Hoping you