- Description
- Curriculum
- Reviews
-
6SELECT Statement
The SQL data manipulation language (DML) is used to query and modify database data. In this chapter, we will describe how to use the SELECT, INSERT, UPDATE, and DELETE SQL DML command statements, defined below.
SELECT – to query data in the database
INSERT – to insert data into a table
UPDATE – to update data in a table
DELETE – to delete data from a table
In the SQL DML statement:-
Each clause in a statement should begin on a new line.
-
The beginning of each clause should line up with the beginning of other clauses.
-
If a clause has several parts, they should appear on separate lines and be indented under the start of the clause to show the relationship.
-
Upper case letters are used to represent reserved words.
-
Lower case letters are used to represent user-defined words.
-
-
7INSERT statement
-
8UPDATE statement
-
9DELETE statement
-
10MODULE 2 QUIZ
-
11Filtering with the WHERE Clause
Terms You Need to Understand
-
The WHERE clause
-
The ORDER BY clause
-
Filtering
-
Sorting
-
Comparison condition
-
Logical condition
-
Top-N query
-
Ascending sort
-
Descending sort
Concepts You Need to Master
-
Filtered queries
-
Sorted queries
-
Precedence of logical conditions
-
What the available comparison conditions are
-
What the available logical conditions are
-
Comparison conditions compare expressions
-
Logical conditions allow for multiple comparisons
-
What equi, anti, and range comparison conditions are
-
The use of LIKE, IN, EXISTS, BETWEEN, ANY, SOME, and ALL comparison conditions
-
Logical condition precedence: (), NOT, AND, OR
-
NULL values and sorting
-
Sorting methods
This chapter covers filtering of rows using the WHERE clause and sorting of retrieved data using the ORDER BY clause. The WHERE clause applies to both queries and most DML commands; the ORDER BY clause applies to queries only.
-
-
12Comparison Conditions
-
13Logical Conditions
-
14Sorting with the ORDER BY Clause
-
15SQL Joins – LEFT Join, RIGHT Join, and INNER Join Explained
-
16How to Use an Inner Join in SQL
-
17INNER JOIN Use Case
-
18How to Use a Right Join in SQL
-
19How to Combine JOINS in SQL
-
20How to Use a Cross Join in SQL
-
21How to Use a Self Join in SQL
-
22Learn SQL: Join multiple tables
-
23Here are 10 quiz questions about SQL Joins – LEFT Join, RIGHT Join, and INNER Join:
-
24SQL Group By Tutorial: Count, Sum, Average, and Having Clauses Explained
-
25Setting up your database
-
26How does a GROUP BY work?
-
27Multiple groups
-
28Writing GROUP BY clauses
-
29Aggregations (COUNT, SUM, AVG)
-
30Working with multiple groups
-
31Using functions in the GROUP BY
-
32Filtering groups with HAVING
-
33Aggregates with implicit grouping
-
34FOR MORE DETAILS
-
3510 quiz questions with multiple choices:
-
36Understanding Correlated and Uncorrelated Subqueries in SQL
Author Bio:
Ben Richardson is the owner of Acuity Training, an IT training company based in the UK. Acuity is one of the UK’s leading SQL training companies. For more details click here.
Sub-queries are queries within another query. The result of the inner sub-query is fed to the outer query, which uses that to produce its outcome. If that outer query is itself the inner query to a further query then the query will continue until the final outer query completes.
There are two types of subqueries in SQL however, correlated sub-queries and uncorrelated subqueries. Let’s take a look at these.
-
375 SQL Subquery Examples
-
38Week 6 Quiz
-
4912 Normalization
Normalization should be part of the database design process. However, it is difficult to separate the normalization process from the (ER) modeling process so the two techniques should be used concurrently.
Use an entity relation diagram (ERD) to provide the big picture, or macro view, of an organization’s data requirements and operations. This is created through an iterative process that involves identifying relevant entities, their attributes and their relationships.
Normalization procedure focuses on characteristics of specific entities and represents the micro view of entities within the (ERD).
-
50First Normal Form (1NF)
-
51Second Normal Form (2NF)
-
52Third Normal Form (3NF)
-
53Boyce-Codd Normal Form (BCNF)
-
54Week 9 Quiz
-
62Chapter 9 Integrity Rules and Constraints
Constraints are a very important feature in a relational model. In fact, the relational model supports the well-defined theory of constraints on attributes or tables. Constraints are useful because they allow a designer to specify the semantics of data in the database. Constraints are the rules that force DBMSs to check that data satisfies the semantics.
-
63Referential integrity in Microsoft Access
-
64Foreign key rules
-
65Relationship Types
-
66Key Terms
-
67Week 11 Quiz