0% found this document useful (0 votes)
10 views1 page

Advance SQL Assigment

The document provides definitions and explanations for key SQL concepts. It covers the purpose of the SELECT statement, filtering records with the WHERE clause, differences between INNER JOIN and LEFT JOIN, the use of the GROUP BY clause, the significance of a Primary Key, and how to insert new records into a table. Each question is assigned a point value of 5 for a total of 30 points.

Uploaded by

maedot2969
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views1 page

Advance SQL Assigment

The document provides definitions and explanations for key SQL concepts. It covers the purpose of the SELECT statement, filtering records with the WHERE clause, differences between INNER JOIN and LEFT JOIN, the use of the GROUP BY clause, the significance of a Primary Key, and how to insert new records into a table. Each question is assigned a point value of 5 for a total of 30 points.

Uploaded by

maedot2969
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

MAEDOT ASRAT ritw/0884/16

5/29/25
aDVANCE sql
Briefly define the following questions (5Pt each)
1. What is the purpose of the SELECT statement in SQL?

 The SELECT statement is used to retrieve data from one or more tables in a database.

2. How do you filter records in SQL?

 We can filter records using the WHERE clause, which specifies conditions that the returned
data must meet.

3. Explain the difference between INNER JOIN and LEFT JOIN.

 INNER JOIN returns only the rows with matching values in both tables
 LEFT JOIN returns all rows from the left table and matching rows from the right table;
unmatched rows from the right table return as NULL.

4. What is the use of the GROUP BY clause in SQL?

 The GROUP BY clause groups rows with the same values in specified columns, often
used with aggregate functions like COUNT(), SUM(), etc

5. What is a Primary Key, and why is it important in SQL?

 A Primary Key is a column (or combination of columns) that uniquely identifies


each row in a table. It ensures data integrity by preventing duplicate and NULL
values.

6. How do you insert a new record into a table in SQL?

 You use the INSERT INTO statement,

EXAMPLE : INSERT INTO table_name (column1, column2) VALUES


(value1, value2);

You might also like