1.

What is SQL and explain its components?

Answer»

SQL is a standard language which is used to accessing and manipulating DATABASES. It STANDS for Structured Query Language. It can be used to develop a web application for a server-side scripting language, like ASP, PHP, etc.

It consists of three components that are listed below:-

  • Data Definition Language.
  • Data Manipulation Language.
  • Data Control Language.
2. Explain the types of joins in SQL?

In SQL, Joins is used to merge records from two or more tables in a DATABASE, BASED on a related column between them.

 

Here are the four types of the joins in SQL

  • INNER JOIN: It returns records that have matching values in both tables
  • LEFT JOIN: It returns all records from the left table and the matched records from the RIGHT table
  • RIGHT JOIN: Right Join returns all records from the right table and the matched records from the left table
  • FULL JOIN: It returns all records when there is a match in either left or right table


Discussion

No Comment Found