UNIQUE Constraint makes sure all values in a column are exclusive. PRIMARY KEY Constraint is also had the same property as UNIQUE Constraint. But there are some differences. In a table only one PRIMARY KEY
Continue ReadingMonth: 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,
Continue ReadingMYSQL 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 PRIMARY KEY. And another table that keeps the reference of parent table PRIMARY
Continue ReadingMySQL PRIMARY KEY CONSTRAINT
PRIMARY KEY:- A PRIMARY KEY constrains uniquely identify 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
Continue ReadingMySQL 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
Continue ReadingMySQL TIMESTAMPDIFF Function
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 will
Continue ReadingLoad 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
Continue ReadingMYSQL 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
Continue Reading