GETTING STARTED WITH SQL: Exercises with PhpMyAdmin and MySQL
- Length: 105 pages
- Edition: 1
- Language: English
- Publisher: Remylent
- Publication Date: 2023-03-09
- ISBN-10: B0BXYNJ1YJ
- Sales Rank: #0 (See Top 100 Books)
SQL (Structured Query Language) is a query language for relational database management. In this book, you will discover the basics of its organization and its characteristics. Using the PhpMyAdmin environment, you will learn how to create a database, tables, columns, constraints, keys (primary and foreign), joins and many other specificities.
SQL has a small set of statements and enables you to select records from one or more tables using the universal SELECT command.
Other expressions like UPDATE, INSERT or DELETE will help you to update, insert or delete records. You will also study several functions that manipulate text, dates and numbers.
Thanks to the exercises in this book, you will understand how a small set of statements can perform accurate actions and enhance your skills.
Enjoy your reading!
ABOUT THE AUTHOR
Rémy Lentzner has been an IT trainer since 1985. Specialized in mastering office automation tools, he supports companies in the professional training of their employees. Self-taught, he has several computer books to his credit.
Chapter 1The working environment 1.1 Installing the local MAMP server 1.2 Starting the phpMyAdmin tool 1.3 Creating a database Chapter 2Tables 2.1 The table, the fields and the primary key 2.1.1 Creating a table 2.1.2 Workshop 2.1.3 Adding information to a table 2.1.4 Finding information in a table 2.1.5 Multiple operators 2.1.6 Miscellaneous operators 2.2 The SELECT command 2.2.1 Examples with SELECT 2.2.2 Sorting a column with Order By 2.2.3 Grouping with GROUP By 2.2.4 The HAVING clause 2.3 Managing records 2.3.1 Deleting a record 2.3.2 Copying a record 2.3.3 The UPDATE command 2.4 Calculating 2.4.1 Grouping and totaling 2.4.2 Statistics 2.4.3 Calculating with a condition WHERE 2.4.4 Calculating with UPDATE 2.4.5 Duplicating a table 2.5 The routines 2.6 The views 2.7 The triggers 2.8 The console 2.9 The privileges Chapter 3Relationships 3.1 Defining relationships 3.1.1 The BOOKS table 3.1.2 The SHOPS table 3.1.3 Displaying the schema 3.1.4 Creating a foreign key 3.1.5 Creating a relationship 3.1.6 The table constraints 3.1.7 The UPDATE or DELETE constraints 3.2 Multi-table queries 3.2.1 The query window 3.2.2 Performing a query by example Chapter 4Functions 4.1 The text functions 4.2 The date functions 4.2.1 Creating a table with dates 4.2.2 Calculations with dates A) Displaying the number of days between two dates B) Displaying the number of months between two dates C) Displaying the number of years between two dates D) Adding 13 days to a date E) Subtracting 10 days from a date F) Subtracting 3 months from a date G) Adding years to a date 4.2.3 The current date and time 4.2.4 Extracting parts of the date 4.2.5 Day of month, week and year 4.3 Functions about numbers 4.4 The aggregate functions Chapter 5Advanced SQL Queries 5.1 A CASE expression in a SELECT 5.2 The COALESCE function and NULL values 5.3 More complex sorting 5.3.1 Sorting with an index 5.3.2 Sorting with several columns 5.3.3 Sorting by substrings 5.4 Ensemble queries 5.4.1 The UNION operator 5.4.2 Creating a table with the UNION operator 5.4.3 The MINUS operator 5.4.4 The IN operator 5.5 Joining several tables 5.5.1 Creating a foreign key 5.5.2 Finding identical names 5.5.3 The LEFT OUTER JOIN operator 5.5.4 The RIGHT OUTER JOIN operator 5.6 Deletions 5.6.1 Removing records in a table 5.6.2 Deleting a table 5.5.3 Deleting an index in a table 5.7 Enumerating objects in a table Glossary
Donate to keep this site alive
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.