Learn SQL in 1 Hour - SQL Basics for Beginners

preview_player
Показать описание
A crash course in SQL. How to write SQL from scratch in 1 hour.

In this video I show you how to write SQL using SQL Server and SQL Server Management Studio. We go through Creating a Database, Creating Tables, Inserting, Updating, Deleting, Selecting, Grouping, Summing, Indexing, Joining, and every basic you need to get starting writing SQL.

PREREQUISITES
You will need a database to practice on. The training uses SQL Server Developer Edition, but you can use MySQL, Oracle or any other relational database.

Install SQL Server Developer Edition:

You will also need a tool to write the SQL that you will send to the database. You can use SQL Server Management Studio (SSMS), Oracle Developer, TOAD, PHPMyAdmin, or any other tool you would like. I am using SSMS in this video.

Install SQL Server Management Studio (SSMS)

TABLE OF CONTENTS
00:00 - Intro
00:48 - Overview
03:27 - Discuss Management Studio
05:10 - Create Database
07:26 - Create Table
10:29 - Insert Data
17:43 - Select Statement
19:00 - Where Clause
22:25 - Update Statement
24:33 - Delete Statement
27:41 - Adding Comments
29:33 - Adding Columns
32:38 - Drop Table
33:17 - Add Primary Key
36:00 - Create Products Table
38:54 - Create Orders Table
45:37 - Foreign Keys
50:30 - Joins
56:50 - Functions/Group By

READ THE ORIGINAL ARTICLE WITH SQL SCRIPTS HERE

YOUTUBE NEWS UPDATES

VISIT SQLTRAININGONLINE.COM FOR TONS MORE VIDEO NEWS & TIPS

SUBSCRIBE FOR OTHER SQL TIPS AND NEWS!

SUBSCRIBE TO OUR EMAIL LIST!

LET'S CONNECT!
Рекомендации по теме
Комментарии
Автор

TABLE OF CONTENTS
00:00​ - Intro
00:48​ - Overview
03:27​ - Discuss Management Studio
05:10​ - Create Database
07:26​ - Create Table
10:29​ - Insert Data
17:43​ - Select Statement
19:00​ - Where Clause
22:25​ - Update Statement
24:33​ - Delete Statement
27:41​ - Adding Comments
29:33​ - Adding Columns
32:38​ - Drop Table
33:17​ - Add Primary Key
36:00​ - Create Products Table
38:54​ - Create Orders Table
45:37​ - Foreign Keys
50:30​ - Joins
56:50​ - Functions/Group By

PREREQUISITES
You will need a database to practice on. The training uses SQL Server Developer Edition, but you can use MySQL, Oracle or any other relational database.

Install SQL Server Developer Edition:

You will also need a tool to write the SQL that you will send to the database. You can use SQL Server Management Studio (SSMS), Oracle Developer, TOAD, PHPMyAdmin, or any other tool you would like. I am using SSMS in this video.

Install SQL Server Management Studio (SSMS)

joeyblue
Автор

Youre a god. You taught me more in an hour than my professor has all semester, and earned me an 84 on a test that I otherwise would have scored anywhere between 0 and -100 on. So thank you.

austincotter
Автор

Your 1 hour video taught me more than my online class has in 6 weeks. Thank you so much!

jason
Автор

As my career changes, it is a real plus to find your videos. Patiently explained and gone thru.
I don't feel overwhelmed or stressed. You make it seem as though I've been in the wrong field all along. Thanks!!!

riseofthelady
Автор

The one-hour video covers almost all the basic keys. It is absolutely the great class for beginners. Thanks a lot!

hanglishi
Автор

Good video. Good pace, good voice, good mood, good examples I'm learning. Thank you.

FINANCI
Автор

Brilliant I have learned more in under 1 hour than I did participating on a course for 3.
Excellent so glad I found the video... easy to grasp the idea and the video is great
Thanks

pamelamalthouse
Автор

Thanks. This is the best introduction on SQL I found so far. It starts simple and gradually builds on the simple start. Really helpful for beginners like me.

Rahee
Автор

Thanks Joey! I am experienced with SQL and will occasionally work through this hour as a warm up on the fundamentals. You've done a great job sir.

andrewpeterson
Автор

Easy to follow. No pausing needed.
Clear concise and only what is required.
This will become the default SQL tutorial on youtube.

Sowrdfish
Автор

You are good, buddy... even for a rusty DBA who's been away from SQL and hands-on database management for a long time

kevinclarke
Автор

Absolutely brilliant. Learnt so much in an hour. Now I won't be lost when discussions about foreign keys, joins strings and everything SQL related is being had. Thanks so much Joey!!!

jonlaniyan
Автор

Thanks for the refresher course. It been a few years since I wrote any SQLand this was helpful!

paulapericozzi
Автор

[5:20] Create Database
[6:18] Activate Database
USE database_name
[7:28] Create Table
CREATE TABLE table (col1_name col1_type,
col2_name col2_type)
[10:27] Insert Data
INSERT INTO table (col1, col2, col3)
VALUES (val1, val2, val3)
[17:47] Select Data
SELECT columns FROM table
WHERE condition(s)
Note: for multiple conditions, use AND, OR
[20:44] WHERE clause examples with operator LIKE with wildcard %, _
[22:30] Update Data
UPDATE table
SET col = …
WHERE some condition(s)
[26:35] Delete Data
Delete table
WHERE some condition(s)
[27:41] Comment
One-line comment
-- your comment
Multi-line comments
/* your comments
your comments */
[29:25] Add column(s)
ALTER TABLE table_name
ADD column_name column_type
[33:13] Drop table
[40:00] Prepare tables: orders, Customer, Products
[46:30] Add foreign key for table
ALTER TABLE tb_name
ADD FOREIGN KEY (tb1_col) REFERENCES tb2(tb2_id);
Notes: set two foreign keys for CustomerID, ProductID within table orders, reference to tables Customer and Products respectively.
We can also create foreign keys when we create table
[50:32] Joins and Relationships
[50:10] Example: Inner join & alias
[52:29] Refresh Local Cache to avoid red lines, Ctrl + Shift + R
[57:14] Function SUM()
[58:05] Group by
[1:00:03] Funtion AVG()
SELECT column AS column_name
FROM table_x AS alias_x
INNER JOIN table_y AS alias_y ON alias_x.id = alias_y.id
INNER JOIN table_z AS alias_z ON alias_z.id = alias_z.id
GROUP BY column
Notes: AS is optional

fantasyd
Автор

Very straight forward of teaching that most of the beginners needs..

emanjavascript
Автор

One hour class taught me more than a month's class!
Thank you Joey :)

khehrainder
Автор

This is a great overview! I'm totally new to SQL but was handed some work projects with it and have been trying to grasp the fundamentals of what was going on. This is super helpful!

marensvare
Автор

I'm watching this tutorial and simultaneously doing my project that's due in 10 hours or so. You just earned yourself a subscriber mate ❤️
Edir: I got full marks, God bless you

zinedinhadzajlija
Автор

Thanks alot for the clear instruction. I've been struggling with SQL for some while but somehow while watching your video(s) I noticed I'm becoming more and more handy with SQL and it's actions. Much appreciated! Greetings from The Netherlands.

OphidianAngel
Автор

You broke it down beyond my expectations. Covered so much in an hour. You're a genius

olakunleoni