4. Извлечение данных: подробный разбор — Изучаем MySQL и MariaDB с нуля и создаем приложение для ...
Dynamic Tech Computing
0:00 / 0:00
4. Извлечение данных: подробный разбор — Изучаем MySQL и MariaDB с нуля и создаем приложение для ...
13 просмотров · 4 дня назад
Dynamic Tech Computing
12 подписчиков
13 просмотров · 4 дня назад
Learn how to retrieve, sort, filter, and search #data in #MySQL and #base and its city table, you'll learn how to build increasingly powerful SQL queries for real-world database applications.
📚 WHAT YOU'LL LEARN
In this lesson, you'll learn how to:
• Retrieve data using SELECT
• Retrieve all columns using SELECT *
• Select specific columns from a table
• Use the FROM clause
• Rename result columns using AS
• Sort results using ORDER BY
• Sort data in ascending order with ASC
• Sort data in descending order with DESC
• Limit results using LIMIT
• Filter records using WHERE
• Compare values using SQL comparison operators
• Search for patterns using LIKE
• Use the % wildcard
• Use the _ wildcard
• Search for values using IN
• Exclude values using NOT IN
• Combine conditions using AND
• Combine alternative conditions using OR
• Use REGEXP for advanced pattern matching
• Understand regular-expression metacharacters
• Match characters at specific positions
• Match the beginning and end of strings
• Work with character ranges and character classes
• Match spaces and punctuation using predefined classes
💻 SQL COMMANDS & OPERATORS COVERED
SELECT
FROM
AS
ORDER BY
ASC
DESC
LIMIT
WHERE
LIKE
IN
NOT IN
AND
OR
REGEXP
🔎 PATTERN MATCHING WITH LIKE & REGEXP
You'll learn how MySQL and MariaDB can search for patterns inside text.
With LIKE, you'll work with the % and _ wildcards to find values that begin with, end with, contain, or match specific character positions.
You'll then move to REGEXP and learn more advanced pattern matching using regular-expression symbols such as ^, ., *, $, + and ?.
🌍 PRACTICAL DATABASE EXAMPLE
The lesson uses the World database and its city table to demonstrate practical SQL queries involving city names, zones, and population.
🎓 WHO THIS TUTORIAL IS FOR
This tutorial is suitable for:
• Students learning SQL
• Beginners learning MySQL
• MariaDB beginners
• Programming students
• Aspiring software developers
• Database students
• Anyone learning SQL and databases from scratch
🚀 CONTINUE THE COURSE
In the previous lessons, we learned how to create databases and tables and how to insert, update, and delete data.
Now we move deeper into one of the most important skills in SQL: retrieving the right data from a database.
Practice the queries yourself and experiment with different conditions and search patterns as you follow along.
👍 Like this video if you found it helpful.
💬 Leave a comment and tell me which SQL clause or operator you found most useful.
🔔 Subscribe and follow the complete MySQL & MariaDB course for more practical SQL, database, programming, and software development tutorials.
#MySQL #SQL #MariaDB #MySQLTutorial #DatabaseTutorial
00:00 Introduction to Data Retrieval
00:24 Download & Load the World Database
01:09 CREATE DATABASE IF NOT EXISTS & USE
01:32 Understanding the City Table
01:47 Execute the SQL File
02:25 SELECT: Retrieve Data from a Table
03:09 Selecting Specific Columns
03:30 Column Aliases with AS
04:10 Sorting Data with ORDER BY
04:51 ASC vs DESC
05:07 Limiting Results with LIMIT
05:30 Filtering Data with WHERE
06:11 Filtering by Population
06:40 Pattern Matching with LIKE
07:33 Matching a Single Character with _
07:56 Filtering with IN
08:29 Excluding Values with NOT IN
08:57 Combining Conditions with AND
09:47 Combining Conditions with OR
10:29 Introduction to REGEXP
11:21 REGEXP Metacharacters & Character Ranges
12:17 Character Sets with REGEXP
12:44 REGEXP Beginning Anchor ^
13:21 REGEXP End Anchor $
13:29 Matching Characters with REGEXP
13:52 One or More Matches with +
14:15 Optional Matches with ?
14:32 REGEXP Predefined Character Classes
14:52 Matching Punctuation with [:punct:]
15:05 More REGEXP Character Classes