No video

SQL Query Basics: Insert, Select, Update, and Delete

  Рет қаралды 38,633

Engineer Man

Engineer Man

4 жыл бұрын

Without question the most used statements in SQL are the Insert, Select, Update, and Delete statements. They make up the core foundation for any database work.
Hope you enjoyed the video!
Create Tables Video:
• How to Design and Crea...
Check out this code here:
github.com/engineer-man/youtu...
Join my Discord server to chat with me:
/ discord
Check out some code on my GitHub:
github.com/realtux
github.com/engineer-man/youtube
Come visit us on Reddit:
/ engineerman
Other Social:
/ _engineerman
/ engineermanyt

Пікірлер: 50
@pierogii_
@pierogii_ 4 жыл бұрын
This taught me more than a $2,000 university database basics class. Thanks man!
@filipomazic8823
@filipomazic8823 4 жыл бұрын
sql injection video incomming? :)
@ZacKoch
@ZacKoch 4 жыл бұрын
Great video! Everyone should know SQL basics, you're going to run into a database no matter what technical career path you choose.
@thomasterp-madsen3946
@thomasterp-madsen3946 4 жыл бұрын
Great video, as always - I'll check out your other SQL videos right away; you're great at explaining everything in just the right amount of detail AND in a perfect tempo. Thank you so much!
@MrGFYne1337357
@MrGFYne1337357 4 жыл бұрын
Dude you explain things so well and it is so much easier for me to understand,, ty. sincerely ty.
@justnbody.5934
@justnbody.5934 4 жыл бұрын
just found your channel and i’m learning so much from it MASSIVE THANK YOU BRO ❤️❤️
@mayne4672
@mayne4672 2 жыл бұрын
Thanks broo!! I wish that I'll get the teachers like you...Keep it up buddie!!!
@kevinc.7730
@kevinc.7730 4 жыл бұрын
Apologies if you already made one, but an ATOM tips and tricks vid would be much appreciated. Love the content, Thanks!!
@MatiEP09
@MatiEP09 2 ай бұрын
im having tommorow an exam on this, nice explanation!
@nidhi327
@nidhi327 4 жыл бұрын
I knew the basics. But never used limit and transaction..thanks EM
@morning5tarr
@morning5tarr 4 жыл бұрын
Thanks, If you could explain about how internals work , would be great.
@ayeshairshad1298
@ayeshairshad1298 4 жыл бұрын
I am outreaching you on behalf of NCache by Alachisoft. Ncache is a 100% .NET / .NET Core distributed cache. We have been following your KZfaq Channel since quite a while and we really can’t help appreciating the amazing work you are doing. We saw some Tutorials, How-To guides and Tips on your channel, so we would really want to have an alliance with you for some similar videos. I hope you don’t mind if we talk further about this.
@6s6
@6s6 4 жыл бұрын
Looking forward to more DB videos. Subscribed.
@blanketfish
@blanketfish 4 жыл бұрын
Love your videos. Could you do a video on "ON DELETE" clause when using foreign keys or foreign keys in general?
@HadToChangeMyName_YoutubeSucks
@HadToChangeMyName_YoutubeSucks 4 жыл бұрын
A shortcut for the insert of multiple rows, insert into people (name, age) values ('john', 21), ('fred, 22), ('albert', 23);
@punky_574
@punky_574 3 ай бұрын
Very helpful, thank you!
@misterinc6323
@misterinc6323 4 жыл бұрын
I just started to learn python and a bunch of things related to data science 1 month ago. I really appreciate your video. I was wondering if you could tell me what IDE are you using for SQL and asking for doing a video for noSQL. Cheers
@farxx5628
@farxx5628 3 жыл бұрын
Thank you so much ! u saved my exam
@cyberkid7690
@cyberkid7690 4 жыл бұрын
Hi Engineer Man, thank you for such a great informative video, have you build any courses on SQL or any other programming language.
@siarog1290
@siarog1290 3 жыл бұрын
give this man a cookie :D great Video
@adparikhyt8859
@adparikhyt8859 4 жыл бұрын
That's help me in computer application thanks bro
@PhG1961
@PhG1961 4 жыл бұрын
Wonderfull !! We want more..... !!
@user-hb2df6nn2y
@user-hb2df6nn2y 2 ай бұрын
you are great man but please add the possibility to activate the subtitles, you speak fast and we are not all english native speakers, so they help. have a nice day and thank you ;)
@DerekWelchElectric
@DerekWelchElectric 4 жыл бұрын
Thank you EM!
@arielapp9469
@arielapp9469 4 жыл бұрын
that happened to me, I wrote a database update php page, obviously one of the functions was: delete from table_name, it took me a while to understand that, I forgot to write down the where part, and I kept deleting my table, goos thing I was in the development stage, and not in the production stage :)
@stephenwatson8125
@stephenwatson8125 4 жыл бұрын
Hello Engineer man if you could help I would appreciate it. How do you syntax sql to display output in a decimal field when using number like 2,244.90 and not having the database erroring the comma thinking it is an extra field.
@Javier-ue5nt
@Javier-ue5nt 4 жыл бұрын
Nice video :D
@bokkenka
@bokkenka 4 жыл бұрын
Nice video. Thanks. Is there a way to select a number of random records?
@EngineerMan
@EngineerMan 4 жыл бұрын
If performance doesn't matter to you, adding "order by rand()" at the end should be fine. If performance does matter, then the solution is based on the data (size, contiguous or non-contiguous surrogate keys, and others). Generally speaking, the solution is to get the max id of the table, multiply it by rand(), get the nearest whole number, then select the record that is either exactly that id or the nearest one.
@peremokechristopher7759
@peremokechristopher7759 2 жыл бұрын
Thanks Engineer Man for this Vidoe. I have issue using the UPDATE statement. Its a simple student database, I used fetchdata to display student's name and age on thier dashboard. Then I decide to create room for name editing, so they click edit to change thier name with UPDATE statement but immediately it updates, the variables for age and name will be showing error like Undefine variable..... please help me. Thanks
@mohamedelhagib
@mohamedelhagib 5 ай бұрын
Hi can you help me how can i delet using this select SELECT PRO.CDPRO,TRA.NHORAS,TRA.CDEMP FROM PROYECTO PRO,TRABAJA TRA WHERE TRA.CDPRO = PRO.CDPRO group by PRO.CDPRO,TRA.NHORAS,TRA.CDEMP HAVING SUM(NHORAS)=0; this is the incial select and i need to transforme it into delete how can a i do it? thanks
@BloodlyKill
@BloodlyKill 4 жыл бұрын
can u make a video on git local and repository
@brandon-22
@brandon-22 4 жыл бұрын
8:52 impressive can you do this in sql server as well as it every query is transaction already? like can i delete stuff there, do a select and then commit/rollback based on my liking?
@EngineerMan
@EngineerMan 4 жыл бұрын
I believe sql server is "begin transaction", otherwise it's the same.
@northendtrooper
@northendtrooper 4 жыл бұрын
Question. When rolling back. Does it rollback to the start of the transaction or only the most recent command you ran?
@EngineerMan
@EngineerMan 4 жыл бұрын
It rolls back to the start.
@capjus
@capjus 4 жыл бұрын
Who is watching this in 2020?? :D
@noweare1
@noweare1 4 жыл бұрын
Are you coding in python and just using a sql libray. Sorry, I do not know what SQL is. I know databases and fields and queries but is it a language all its own ?
@EngineerMan
@EngineerMan 4 жыл бұрын
SQL (Structured Query Language) is its own thing. The database understands SQL directly.
@hashkeeper
@hashkeeper 3 жыл бұрын
kalix from uruguay lol
@petros_adamopoulos
@petros_adamopoulos 4 жыл бұрын
Who in his sane mind would have an "age" column in a database instead of date of birth... I mean, am I the crazy one here? Thanks for the video though, I learned a few things I might remember the day I'm forced to use SQL.
@EngineerMan
@EngineerMan 4 жыл бұрын
It was just an example, but, one such table might be a table containing medical screenings where it's important to store the age at the time of the screening.
@jaysonp9426
@jaysonp9426 Жыл бұрын
You don't capitalize 😳 HEATHEN!
@HadToChangeMyName_YoutubeSucks
@HadToChangeMyName_YoutubeSucks 4 жыл бұрын
You committed one of the biggest sins in my sql peeves, naming the id. Why the heck would you call your primary key for the people table person_id??? The primary key should either be simply id or include the name of the table, so the people table should have a pk of id, peopleID or people_id. Use of your naming standard should be LAW across all of your tables, so if you use camel case in table names you use camel case in the primary key, ditto for snake case. This way you know the name of the primary key of any table simply by knowing the name of the table if you include it in the pk name, but my tables simply use id as the primary key and any referencing keys to that table use the table name and ID, so join category on category.peopleID = people.id (or people.people_id/people.peopleID if that's your naming standard). Nothing is more frustrating when you're creating joins than everyone using their own standards for keys and referencing keys that tell you nothing. I have tables right now in a system I'm working on where modelID in one table actually points to the signtypeID in a table named signTypes, it's incredibly frustrating since there's no model table or signtype table and therefore doesn't tell me what table the join is for, plus even my own new tables have to point to signtypeID instead of signTypesID so I have to remember what the darned primary key was arbitrarily named or go look it up. The facilityAssets table has a pk named assetID, there is no asset table. DON'T DO IT PEOPLE!
@EngineerMan
@EngineerMan 4 жыл бұрын
I agree. I did mean to do people_id. I also like logical and consistent naming. I appreciate the comment.
@HadToChangeMyName_YoutubeSucks
@HadToChangeMyName_YoutubeSucks 4 жыл бұрын
@@EngineerMan -- I thought that was really odd for you to make a mistake like that. We all have our embarrassing moments, I can't count the times I looked at something a second time and said "how long you been doing this and still do that kind of stupid", and I've been doing sql for around 40 years. Your use of transactions was great, I seldom see people do that and consider it an absolute must. Few things suck more than telling your boss you just screwed up his data by not triple checking your work. I not only use transactions before updates or deletes, I run select with my constraints first so I can see exactly what will be changed before I change it, and then I still use transactions just in case. If you delete the wrong records and there are cascading triggers recovering can be an incredible headache, especially on a live system that people are currently updating and inserting records into. I further advise to always have a second server with a copy of the live servers last backup you can run any such commands against so if you screw up you do it on data that can be fairly easily restored. Never perform any action that affects live data until you've tested it on non-live data. Bit beyond an introductory to sql, but anyone making a living manipulating someone else's data will be well served to do so since even rolling back transactions can be a problem on live data.
@EngineerMan
@EngineerMan 4 жыл бұрын
It's certainly not how I design tables. At first when I was reading your comment I was confused what you were taking exception to. In that moment though I genuinely believed I had done people_id.
@HadToChangeMyName_YoutubeSucks
@HadToChangeMyName_YoutubeSucks 4 жыл бұрын
@@EngineerMan -- As I said I've done goofy things accidentally and later had to chastise myself when I realized what I'd done, it does happen. And believe me, when is see code that makes me say "what the **** were you thinking???" I'm much harder on the offender if it's my code than if it's a workmates code. Thank goodness I don't have potentially 288K people looking over my shoulder correcting me.
@prarcosgaming-wwe2423
@prarcosgaming-wwe2423 2 жыл бұрын
shubham pundir
@COOKINGBIRD
@COOKINGBIRD Жыл бұрын
I'm so grateful for the SQL tutorial video. Thank you for sharing your knowledge. 😊📹💾
SQL Joins: Left Join, Right Join, and Inner Join
8:24
Engineer Man
Рет қаралды 12 М.
Box jumping challenge, who stepped on the trap? #FunnyFamily #PartyGames
00:31
Family Games Media
Рет қаралды 25 МЛН
Идеально повторил? Хотите вторую часть?
00:13
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 14 МЛН
8 super heroic Linux commands that you probably aren't using
8:38
Engineer Man
Рет қаралды 727 М.
Engineer Breaks Down Hollywood Programming Scenes
11:02
Engineer Man
Рет қаралды 22 М.
Learn SQL In 60 Minutes
56:24
Web Dev Simplified
Рет қаралды 2,1 МЛН
Why I Use Linux in 2020
6:34
Engineer Man
Рет қаралды 96 М.
Python Resume Projects - You Can Finish in a Weekend
10:38
Tech With Tim
Рет қаралды 1,5 МЛН
Insert, Select, Delete and  Update from database in java
41:25
Khadem tech
Рет қаралды 54 М.
Python Web Scraping with Beautiful Soup and Regex
14:24
Engineer Man
Рет қаралды 199 М.
How to use MySQL Triggers
8:18
Engineer Man
Рет қаралды 25 М.
Difficult Programming Concepts Explained
11:13
Engineer Man
Рет қаралды 69 М.
Box jumping challenge, who stepped on the trap? #FunnyFamily #PartyGames
00:31
Family Games Media
Рет қаралды 25 МЛН