Posts

MYSQL- Joining Tables with Inner Join statement

Image
  MYSQL- Joining Tables with Inner Join statement MYSQL is a widely used relational database management system (RDMS). It is an open-source application. A “Join statement” is used to combine rows from two or more tables, based on a related column between them. 👉INNER JOIN -Returns records that have matching values in both tables. ✅Generating Random Data for the scheme. Creating  EMPLOYEE  and  EMPLOYEE DEPARTMENT Tables  and inserting values by using a few MYSQL Commands. 🔷Using MYSQL Commands and Data types for creating an Employee Table. CREATE DATABASE  — creates a new database. CREATE TABLE - creates a new table. USE  — selects a simple database and then performs operations on it using the in-built commands. INSERT INTO  — inserts new data into a database. INT  — Integer numerical (no decimal). VARCHAR  — data type stores variable-length character strings. INNER JOIN  — selects records that have matching values in both tables....

Types of MYSQL JOINS

Image
  Types of MYSQL JOINS A “Join statement” is used to combine rows from two or more tables, based on a related column between them.             🔲Do check the previous Article about INNER JOIN ⚡Created Random data and experimented with different JOINS. 👉Different Types of SQL JOINs to fetch data: INNER JOIN LEFT JOIN RIGHT JOIN CROSS JOIN SELF JOIN 🔹Used MYSQL Commands and Data types: CREATE TABLE - creates a new table. SELECT  — is used to select data from a database. INSERT INTO  — inserts new data into a database. LEFT OUTER JOIN (or) LEFT JOIN — this type of Join would fetch all the rows (including NULL values) from the table which is on the left side of the JOIN query. RIGHT OUTER JOIN (or) RIGHT JOIN— in this type of Join all the records that do not match from the right table are returned with NULL values on the columns for the left side table. UPDATE  — the statement is used to modify the existing records in a table. ALTER T...