Загрузка страницы

What are the SQL Order By Clause and Expression Statement Language Elements? (Part 4)

▶ C'mon over to https://realpars.com where you can learn PLC programming faster and easier than you ever thought possible!

=============================

▶ Check out the full blog post over at
https://realpars.com/sql-order-by/

=============================

If you are just now joining along with this series of videos, please note that you are going to learn about SQL programming basics.

If you would like to follow along with us, please review the RealPars video, “How to install MySQL and import a sample database”, on how to download and setup MySQL database on your computer.
(https://realpars.com/mysql/)

“What are SQL Where and Like statements basics” (https://realpars.com/sql-where/), continues where we left off within the “What are SQL programming basics” video for our series of lessons covering SQL programming.
(https://realpars.com/sql/)

In the previous videos, we learned about how important, working as an automation professional, relational database management systems are to a world of data that is constantly changing and evolving every second.

In this video, you will learn about some of the more advanced SQL statements and clause commands such as Order by.

Our sample database used in this series of videos was named realparsmodel.

You can find the download links for our sample database and its diagram here:
(https://realpars.com/wp-content/uploads/2019/12/realparssampledatabasev2.zip)
(https://realpars.com/wp-content/uploads/2020/01/RealParsSampleDatabaseV2-Diagram.zip)

Realparsmodel database has several tables. These tables are outlined in the enhanced entity-relationship diagram.
This diagram shows the relationships between entities.

The data contained within the sample database consists of the following tables:
– Students: stores student’s data.
– Courses: stores a list of courses.
– Course lines: stores a list of course line categories.
– Orders: stores sales orders placed by customers.
– Order details: stores sales order line items for each sales order.
– Payments: stores payments made by students based on their accounts.
– Employees: stores all employee information and organization structure.
– Offices: stores sales office data.
Every programming language, such as SQL, should follow a unique set of rules called Syntax. One of these rules is that all of the SQL statements start with any of the keywords like SELECT, INSERT, UPDATE, DELETE, etc. and they end with a semicolon.

The most important point to be noted here is that SQL keywords are NOT case sensitive.

The four fundamental operations that apply to any database are:
– SELECT: for reading the data
– INSERT: for inserting new data
– UPDATE: for updating existing data
– DELETE: for removing data

The ORDER BY clause allows you to sort a result set by a single column or multiple columns and sort a result set by different columns in ascending or descending order.

Now using the select statement from Students table and ordering the results by last names and descending the query, would be written like this:
---------------------------------------------------------
SELECT Lastname, Firstname, City
FROM realparsmodel.students
ORDER BY Lastname DESC;
---------------------------------------------------------

The results display the last names in descending order.

=============================

Review the MySQL minimum hardware requirement web page here:
https://forums.mysql.com/read.php?11,629199,629211

Download the MySQL Installer:
https://dev.mysql.com/downloads/installer/

Download the sample database SQL file from here:
https://realpars.com/wp-content/uploads/2019/12/realparssampledatabasev2.zip

Download the sample database diagram file from here:
https://realpars.com/wp-content/uploads/2020/01/RealParsSampleDatabaseV2-Diagram.zip

=============================

Missed our most recent videos? Watch them here:

https://realpars.com/profibus/

https://realpars.com/differential-pressure-transmitter

=============================

How to Install MySQL and Import a Sample Database (Part 1)
https://realpars.com/mysql

What are SQL Programming Basics? (Part 2)
https://realpars.com/sql

What are SQL Where and Like Statements Basics? (Part 3)
https://realpars.com/sql-where

=============================

To stay up to date with our last videos and more lessons, make sure to subscribe to this YouTube channel:

http://goo.gl/Y6DRiN

=============================

TWEET THIS VIDEO https://ctt.ac/dw488

=============================

Like us on Facebook: https://www.facebook.com/therealpars/

Follow us on Twitter: https://twitter.com/realpars

Follow us on LinkedIn https://www.linkedin.com/company/realpars

Follow us on Instagram https://www.instagram.com/realparsdotcom/

#RealPars #SQL #MySQL

Видео What are the SQL Order By Clause and Expression Statement Language Elements? (Part 4) канала RealPars
Показать
Комментарии отсутствуют
Введите заголовок:

Введите адрес ссылки:

Введите адрес видео с YouTube:

Зарегистрируйтесь или войдите с
Информация о видео
20 января 2020 г. 19:00:00
00:09:46
Яндекс.Метрика