HomeНаука и техникаRelated VideosMore From: Traversy Media

SQL Crash Course - Beginner to Intermediate

8260 ratings | 623315 views
Updated MySQL Crash Course - https://www.youtube.com/watch?v=9ylj9NR0Lcg In this course we will cover all of the fundamentals of the SQL (Structured Query Language). This course is great for beginners and also intermediates. We will cover the following... Overview of SQL Create, alter and delete databases & tables Query a database using multiple operators Data types Insert, update and delete records Join tables together Use aliases Constraints (Primary, foreign) Indexes WANT MORE? CHECK OUT MY SQL COURSE: https://www.eduonix.com/affiliates/id/16-10034 SPONSORS: DevMountain Bootcamp - https://goo.gl/6q0dEa
Html code for embedding videos on your blog
Text Comments (389)
victor hopo (1 month ago)
Solid!!!. Thanks a lot
Threelly AI (1 month ago)
http://www.threelly.com/ Threelly uses state of the art A.I. to analyze videos for key insights: topics, scenes, people, sentiments, and much more.
Threelly AI (1 month ago)
http://www.threelly.com/ With Threelly AI; YouTubers, Educators, Governments or Corporations can now extend their YouTube capabilities; getting a brand new, unique and distinctive way to standout from the crowd, WOW subscribers, learn quicker, discover new insights, search deep into their videos; thus making any YouTube Channel - more FUN, RELEVANT and ENGAGING for viewers.
Ruwan Indika (2 months ago)
Great SQL crash course
green ellipse (2 months ago)
There are Programming tutorials on youtube and there are Traversy Media tutorials. I don't know how you do it Brad, but it's impressive that you always explain everything, and it makes sense. It's like an one-on-one classroom. Big Like!
Andy B (2 months ago)
Video One, Day one. Got an SQL exam in 10 days and I'm terrified. Hopefully in 11 days I'll be able to come back and report success!
Mahesh Jamdade (2 months ago)
SQL queries with examples here, thank me later https://github.com/maheshmnj/CheatSheet/blob/master/SQL_Queries.txt show some love star the repositories :)
Mimi Krasteva (2 months ago)
Really fast way to learn SQL. Thank you!
Christiaan Verhoef (3 months ago)
Dear Brad, Thank you so much for your hard work, I searched the internet far and wide for good material for my students. Yours is the only one I found to be good, every time.
Siniša Miličić (3 months ago)
Table values: INSERT INTO customers (firstName, lastName, email, address, city, state, zicode) VALUES ("Mike", "Smith", "[email protected]", "22 Birch Lane", "Amesbury", "MA", "01913"), ("Kathy", "Morris", "[email protected]", "40 Willow St", "Haverhill", "MA", "01860"), ("Steven", "Samson", "[email protected]", "12 Gills Rd", "Exeter", "NH", "01283"), ("Lilian", "Davidson", "[email protected]", "7 Whittier St", "Brooklyn", "NY", "34883"), ("Derek", "Williams", "[email protected]", "445 Madison St", "Yonkers", "New York", "34993");
Eneiro Matos (3 months ago)
Thank you so much for this awesome course!
Z H (4 months ago)
what is the difference between SQL and MySQL
MadEzra64 (2 months ago)
SQL stands for Structured Query Language. It's a little sort of like a programming language but much simpler and straight forward. It's called a scripting language to be precise and it's the standard used for managing relational and non-relational databases. MySQL is one of many Relational Database Management Systems (RDBMS) with its own set of syntax and features. Oracle DB (they also manage MySQL as well) is another, along with Microsoft SQL Server just to name a couple other common ones. So hopefully that clears things up. SQL is just the language used by all these RDBMS suites and each suite has some differences and use cases but technically speaking they both generally do the same thing. Store BIG data in a way that's structured and accessible. Our MS SQL Database here at work is almost 300GBs in size, and that's relatively small for a database lol
OGUNSAKIN D. PETER (4 months ago)
Brad, this is out of this world, you're good at what you do. on my way to hosting my first web page, I like to tell the World it was possible because of you.
Matthew N (4 months ago)
Thank you
Jose Velarde (4 months ago)
Thank you and easy to follow your tutorial.
drmalamas malamas (5 months ago)
I just started learning SQL. Thank you for the introduction.
Saksham Bakshi (5 months ago)
Nice video . keep making more
Mike Miloserdoff (5 months ago)
This is a very informative youtube. You speak clearly, slowly, allowing a viewer to digest the information being learned. You keep it simple, which is good for learning or for refresher. In the use of sum (age) = 185, you stated that you didn't know what the sum of age could be used for. In a lot of cases, numeric summations like the example have been used as "hash totals", to ensure that all records were processed; this was a very common practice in the days of flat files and mainframe computer processing. Back in the day, such a "hash total" could have been printed on greenbar paper of the batch job, and used as a control total by batch control analysts, who would confirm that all processing performed in the batch cycle was accurate. This control total was then passed thru feeder applications downstream, which would also calculate the sum, and everything in the batch cycle should have completed with the same summed up age value of 185. Thanks for your time in developing this video. Recommended subscription.
So you said MariaDB is dropping MySQL, and MariaDB is the one which comes by installing XAMPP. Do we get any compatibility issues in 2019 by following this tutorial?
cdeiscde (5 months ago)
Thank you. Very helpful.
Rohit Bhambhani (5 months ago)
Thanks, Brad!!
oussama boughizene (5 months ago)
laragon is a complete development environment you can used instead of xampp
Dr. Elvis H. Christ (5 months ago)
Sequel pro is a great tool. It's a shame it's only available for Mac. A Linux version would be really nice.
Mon Day (5 months ago)
34:17 ... but of course you can't see the performance gain with an index on a table with 5 records. Actually, it may be slower with an index, if the table is that small :) You should mention that it would be suited if you had 5 million records.
Eduardo (5 months ago)
HELP!!!!!!! After changing the root password, I can't edit config.inc.php file even when providing sudo credentials (I'm using Mac OS)
Shiran Cohavi (6 months ago)
EXCELLENT COURSE. TNX FOR MAKING IT SO SIMPLE
Traversy Media (6 months ago)
You are welcome, thanks for watching
Samesh Wijeweera (6 months ago)
Awesome!
aci25 (6 months ago)
What an awesome tutorial and well explained. Thank you so much for your time and your great teaching. Gracias!
Josh C. (6 months ago)
Last refresher before I take my Oracle SQL Fundamentals exam. watching on 1.5 speed Thanks!
Gökhan Taşkan (6 months ago)
PopSQL might be cool to use in this video (Y)
didier Leprince (6 months ago)
Très bien as usual. Merci 😊
Nadeem Gorsi (7 months ago)
thanks, Brad today I knew some interesting part about SQL. But there is a way to change to uppercase and lowercase in JS, CSS, PHP (or python or what you use) and now also in SQL Is it an important tool for all of these guys must have.
Odeje Monday (7 months ago)
thank you. as per the insert section, what if i have thousands or millions of rows to insert , which definitely i can input manually, how do i go about that?
didier Leprince (8 months ago)
Merci
Patrick Jonas (8 months ago)
Traversy Media Published on Mar 29, 2016 SUBSCRIBED 537K In this course we will cover all of the fundamentals of the SQL (Structured Query Language). This course is great for beginners and also intermediates. We will cover the following... https://www.youtube.com/channel/UC29ju8bIPH5as8OGnQzwJyA
Elmira Ch (8 months ago)
Wow made speed at 1.5 and it was really short and awesome :)
Shovine Bojraj (8 months ago)
Thank you Brad :) , i did this over the weekend, gona practice some more until it becomes second nature.
Yu haooo (8 months ago)
i changed the root password, then cant login in any longer!!!.... and i cant write anything in config.inc.php, and i cant find my.ini on mac... oh man.. i spent half of a day on the password.. T T actually i jus wanna learn sql...
Eduardo (5 months ago)
@Yu haooo Hey! I've been stuck on the same thing. Would you be so kind to clarify your solution, please? I"m trying to follow your suggestion but I don't get it. Thanks in advance!
Yu haooo (8 months ago)
ok if anyone has the same problem, mount volume, then find my.cnf file, then add skip-grant-tables right after [mysqld].
Rahell Hamarash (8 months ago)
An excellent video, Great job
mac lanphere (8 months ago)
any chance you're from the east coast :)
qmars safikhani (8 months ago)
Brad, Thanks immensely for the wonderful and easy to understand video clip on SQL.
Essa Camara (8 months ago)
I am a new student who is currently studying computer engineers,this video is helpful and I will continues to pray may God protect you and shower his blessing on you and the family. Where can I down load if I want to practice it please.
Chamod Nimsara (9 months ago)
thanks a lot
Radha Parmar (9 months ago)
excellent video. very well explained to beginners. thanks
Monique (9 months ago)
I like your courses. They are easy to understand. Thank you for videos!! :) Can you do one on Power BI?
Elite Ahmad (9 months ago)
Insert, update and delete records____13:30 Join tables together_____38:37 Indexes____31:59
error 404 (10 months ago)
شكرا لك 👇 Thank you 👆
Rene Morales (10 months ago)
Thank you so much, ur a great teacher, simple and straight to the point of whats needed in job. No bull. Thank you, keep up the great work.
Sarah Noori (10 months ago)
Dudeeee you are the best, i have been trying to get any keys about it to understand even the book was so confusing. Thank you so much for the straightforward info, the voice was so clear, the language you used was very simple and clear nothing hard no philosophy in it!! Do more videos for the intermediate levels and advanced, please. Keep up the good work. Once again, thanks a lot :))
William (10 months ago)
Here's the full code transcript: https://gist.github.com/whs2k/40cfb9f79ba531c86a67d987edb44080
Yash Tiwari (10 months ago)
thankyou so much for the video clear all concepts basics just wanna know when to use Customer and when to use CustomerS please help
Anthony Kallingal (10 months ago)
After deleting id #3 should it not automatically correct the ids from there on, I mean instead of Steven still being id#4 should become id#3 and so on from there?
prashant dawar { dev } (11 months ago)
awesome one. have a good day.
Shiva Digital Web (11 months ago)
Hi, If I have products and categories and when I delete one category, what happens to the products of that category which was deleted? Should I move those products to a different categories? How to automate this process? Thanks.
Simon Ndung'u (11 months ago)
The best programming nerd online
Vaibhavkumar Patel (11 months ago)
But why we need join we cannot get the data by writing where clause like these order.id=customer.id and order.id = product. id Like that If I am wrong please correct me I am new in these....
Bryan Dela Cruz (11 months ago)
having an error in this brad INSERT INTO orders(orderNumber, productId, customerId) VALUES (001,1,4), (002,3,1), (004,1,1), (005,1,2), (006,1,1), (007,4,6), (008,4,4), (009,2,5); mysql said "#1452 - Cannot add or update a child row: a foreign key constraint fails (`acme`.`orders`, CONSTRAINT `orders_ibfk_1` FOREIGN KEY (`customerId`) REFERENCES `customers` (`id`))"
Age of Reason (11 months ago)
All of your joins returns the same rows all the time. Having a more diverse data set would really help to understand how the different joins really work. I found the entire lecture very informative but the joins really need to produce different results otherwise I'm looking at the same data wondering how the joins are different.
Rakesh raki (11 months ago)
thanks man,except that joining part everything was clear and understood,joining part is bit tricky for beginners,u are great
ty hanserd (11 months ago)
How is this done in management studio
sri sri (11 months ago)
yes the video was good and it is useful for learners to learn easily . in this i learnt many things .thanks for this useful video. https://www.tibacademy.in/mysql-training-in-bangalore/
Grady Clopton (11 months ago)
Great video. Thank you :)
Muhammad Shahryar Azhar (11 months ago)
Your determination and passion is awesome... Thanks for the this tutorial Sir Brad... And your voice is awesome too :p
The knowledge frontier (11 months ago)
Thank you for your work! Dylan
sudipto ranjan (1 year ago)
i need source code . Can anybody provide?
Kronolord (1 year ago)
What Keyboard is this? The sounds are just ASMR!
Carla Gonçalves (1 year ago)
How to save and see the tables we joined?
Carla Gonçalves (1 year ago)
When i created the table orders i checked and i got no keys in the customer and product id:( wondering what did i do wrong ?
Black Clover (1 year ago)
Why not MySql or MSSQL? Why this trash?
Black Clover (1 year ago)
Traversy Media as soon as I heard php I shut it down:) I called php trash, not your work.
Traversy Media (1 year ago)
Wtf are you talking about? This whole thing is done in MySQL through the PHPMyAdmin interface. LOL I am guessing you are very new to this. You should know what you are talking about before you call somebodys work trash
odhiambo fredrick (1 year ago)
Do you have oracle database tutorial or are you planning to add it in your tutorial ?
Raymond (1 year ago)
hey Brad, love your videos.
Threelly AI (11 months ago)
Wow. You can actually slice this video with Threelly: Try the chrome extension. SUPER EASY and FREE https://chrome.google.com/webstore/detail/threelly-smartview-for-yo/dfohlnjmjiipcppekkbhbabjbnikkibo/
Asmongold Highlights (1 year ago)
does anyone here have ever deleted a whole table full of hundreds of customers as mistake?
Dejuan Johnson (1 year ago)
im running in to so many errors just trying to set this up on mac...CAN SOMEONE PLEASE HELP!!!
Diana (1 year ago)
Thank you! needed a refresher course of SQL for an interview (supposed to have working knowledge of SQL) and this video hit the spot! thank you! :)
busyrand (1 year ago)
Well done Brad! Circling back to this and followed along with all the exercises this time. Just finished up your PHP Front to Back Course, and decided to fill in the blanks I had with SQL Queries. I learned a lot of new stuff, after learning some Fundamentals elsewhere. Onto the PDO Course! This channel is a Godsend! I'm Leveling Up Daily from the content here on the Modern PHP Web Stack.
Kay Nunya (1 year ago)
Could you learn MySQL & it transfer to SQL? I'm asking b/c Colt Steele has a mysql course but I don't see many mysql jobs
Gabriel Andy Fono (1 year ago)
hi thankyou so much but I have a problem and I am trying to figure out how to solve . I have never taught programming before and now I have a interest to become software developper . but I am 27 years old and I feel like discourage because I am seeing young people inside the field. please I would like to study SQL and I wanna know this: if I spend 2hours day after how many days ,I am going to be handle to finish with SQL and move on to HTML,CSS AND JAVA SCRIPT. I wanna learn by myseft please help me and give me some tips if you can thank you sir and I look forward to hearing from you.
shiba dhamija (1 year ago)
fully consumed one hour :) :)
Nikolay Sedletskiy (1 year ago)
Thank you for informative and quality content video
nasrmhm (1 year ago)
That was clear and great thank for it
taariqq (1 year ago)
If you used PHPMyAdmin in your title you might get more hits, imho
taariqq (1 year ago)
DBeaver - a must to try out.
Udit Choudhury (1 year ago)
You should add timestamps in these long videos.
Matt Bledsoe (1 year ago)
So i changed the password inside the phpmyadmin gui and got locked out, I followed the instructions to change the file config.inc.php and it wont let me save the file? WTF? I don't have permissions on my own machine to change settings in a file? I'm lost and cant figure this out.
saadak simba (1 year ago)
waan ku salamy sxb sre waxan ahay arday dhigta jmcada waxan culeys iga heesta maaadada sqlka marka waxn rabaa innad igu ccwisid barasheda sxb waxn rajeena innad jawab kaaheli doono insha allh
Creativity Display (8 months ago)
Guuled Simba 😂 walaal ninka somali ma ahan wa cadaan. Englishhka hada taqano wad baran daqso
olerato mohlala (1 year ago)
Great instruction. I love it
Al Moot (1 year ago)
How to install XAMPP??
horrible explanation of joints
Bongo Cat (1 year ago)
Thanks man these are some of the tasks he performed in sql i am writing so this here saves our time whenever we see this tutorial u know creating tables etc takes a lot of time almost all of the functions traversy has performed are done by me thanks to him ofcourse here====> have a see. note some of the table entries were added by sql software (mysql) also try executing statements 1 by 1 only then they'll run properly and you'll understand create database rm; drop table customer; create table customer(ID INT(100) NOT NULL , N VARCHAR(25), Date_of_birth VARCHAR(30), Email varchar(30), PRIMARY KEY(ID)); SELECT *FROM customer; INSERT INTO customer (ID, N, Date_of_birth, Email )VALUES ('92', 'Shaharyar', '1993/02/22', '[email protected]') ,('1', 'Vahaj', '1990/02/12', '[email protected]'), ('2', 'Ali', '1990/03/09', '[email protected]'), ('3', 'Abdur Rehman', '1990/02/12', '[email protected]'), ('5', 'Ahmed', '1990/02/12', '[email protected]'), ('11', 'Umer', '1990/02/12', '[email protected]'), ('6', 'Bhang', '1985/02/12', '[email protected]'),('65', 'Waleed', '2001/02/08', '[email protected]'), ('8', 'WTH', '2006/12/08', '[email protected]'), ('7', 'Salman', '1990/08/12', '[email protected]'), ('4', 'Vahaj', '1998/02/12', '[email protected]'); UPDATE customer SET Email ='[email protected]' WHERE ID =3 ; UPDATE customer SET N='Salman' WHERE email='[email protected]'; DELETE FROM customer WHERE ID=8; SELECT * FROM customer; DROP TABLE customer; ALTER TABLE customer ADD newcol INT(25); ALTER TABLE customer MODIFY COLUMN newcol VARCHAR(25); INSERT INTO customer(newcol) VALUES (334), (14), (382), (994), (123), (564),(453),(4224); ALTER TABLE customer ADD col INT(25); ALTER TABLE customer DROP COLUMN col; SELECT * FROM customer; SELECT N, Email FROM customer; SELECT *FROM customer WHERE N='Salman'; SELECT *FROM customer ORDER BY N; SELECT ID FROM customer; SELECT distinct N FROM customer; SELECT *FROM customer; UPDATE `rm`.`customer` SET `newcol`='23' WHERE `ID`='1'; UPDATE `rm`.`customer` SET `newcol`='32' WHERE `ID`='2'; UPDATE `rm`.`customer` SET `newcol`='76' WHERE `ID`='3'; UPDATE `rm`.`customer` SET `newcol`='1' WHERE `ID`='4'; UPDATE `rm`.`customer` SET `newcol`='28' WHERE `ID`='5'; UPDATE `rm`.`customer` SET `newcol`='12' WHERE `ID`='6'; UPDATE `rm`.`customer` SET `newcol`='3' WHERE `ID`='7'; UPDATE `rm`.`customer` SET `newcol`='4' WHERE `ID`='11'; UPDATE `rm`.`customer` SET `newcol`='6' WHERE `ID`='65'; UPDATE `rm`.`customer` SET `newcol`='9' WHERE `ID`='92'; SELECT *FROM customer WHERE newcol<30; SELECT *FROM customer WHERE newcol BETWEEN 20 AND 30; SELECT *FROM customer WHERE email LIKE '%bbc.com'; SELECT *FROM customer; SELECT *FROM customer WHERE N IN ('Vahaj'); SELECT COUNT(DISTINCT N) FROM Customer; SELECT *FROM customer WHERE email NOT LIKE '%bbc.com'; SELECT * FROM Customer ORDER BY N DESC, newcol ASC; SELECT MIN(newcol) AS Smallestnum FROM customer; SELECT MAX(newcol) AS greatestnum FROM customer; SELECT *FROM CUSTOMER; ALTER TABLE customer ADD Money INT(10); SELECT AVG(Money) FROM customer AS Average; SELECT SUM(Money) FROM customer AS addition; SELECT * FROM Customer WHERE N LIKE 's%'; SELECT DISTINCT N FROM customer; UPDATE rm.customer SET newcol='10' WHERE ID='11'; SELECT *FROM CUSTOMER; ALTER TABLE customer ADD COlUMN PROVINCE varchar(25); SELECT * FROM customer WHERE PROVINCE IN ('punjab','kpk'); SELECT COUNT(PROVINCE=kpk) FROM Customer;
J (1 year ago)
Can you please provide me Link to the video where you Install XAMPP Apache please? I have installed it but am struggling a bit here. If you can provide the link here please would be great!
busyrand (1 year ago)
This is such a Godsend for me now. I was panicking about not picking this stuff [so called easy stuff] up after learning more complex stuff. Thank you for the detailed breakdown so that I can have a firm idea of the scope of the technology and it's applications. Chilled out, took some notes... I think I have this now...
Carlos Peña (1 year ago)
Learned more in this video than I have in 6 weeks on campus! Great intro into SQL!
consciousprogrammer (1 year ago)
Thank you Brad!
Rabindra Joshi (1 year ago)
You can also use USE acme; instead of clicking on database!
ASHISH MISHRA (1 year ago)
What would be the SQL query for adding the age by statement in the same existing table?
SFSylvester (1 year ago)
I think most people should skip the phpmyadmin stuff. They're coming here to learn the language, which is fully testable on a simple REPL like: http://www.sqlfiddle.com/ May be putting folks off in the first 7 minutes....
Hemant Dubey (1 year ago)
You are a perfect teacher, your tutorials shows your depth of knowledge. Very inspiring in every sense. Thanks.
Cassie D (1 year ago)
I thought it was unexpected and fascinating that this course was done without any voice-over or sound, kept watching with these musings in the back of my mind.... then I realized my computer was on mute. Anyway, great tutorial will watch with sound... lol
anshiii iii (10 months ago)
Hahahahahhaahh
DJEpisteme (1 year ago)
Such a seriously great video thank you!
terence jerahuni (1 year ago)
thank you brad..

Would you like to comment?

Join YouTube for a free account, or sign in if you are already a member.