Python MySQL Tutorial - Creating Tables, Inserting & Selecting

Python MySQL Tutorial - Creating Tables, Inserting & Selecting

Tech With Tim

4 года назад

218,744 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Jean-Paul Zimmermann
Jean-Paul Zimmermann - 20.09.2023 12:07

Which version of mysql-connector should one use?Because on september 23 it doesn't work. thanks

Ответить
MrPelastus
MrPelastus - 17.07.2023 16:47

Excellent video!
I am having trouble with this code. I am getting an error 1064 message (MySQLInterfaceError: You have an error in your SQL syntax;). I cannot find where the error is. Any help will be appreciated. here is the code:

create_employees = """CREATE TABLE Employees (
EmployeeID INT AUTO_INCREMENT PRIMARY KEY,
Name VARCHAR,
Role VARCHAR,
Address VARCHAR,
Contact_Number INT,
Email VARCHAR,
Annual_Salary VARCHAR
);"""

cursor.execute(create_employees)
print("Employees table was successfully created.\n")

Ответить
Ayush Purohit
Ayush Purohit - 06.07.2023 21:18

is there a difference between using %s, .format() and f-strings?

Ответить
R A Z A E L
R A Z A E L - 25.04.2023 07:31

You saved my hassssssssssssssss 🤕🤕❤❤❤❤

Ответить
Hossein Dr. Askari
Hossein Dr. Askari - 14.03.2023 10:19

Thanks for your great explanation 🙂

Ответить
Caolan Maguire
Caolan Maguire - 13.03.2023 11:55

Great tutorial! Helped me with a project!

Ответить
ayoosh sharma
ayoosh sharma - 11.03.2023 02:31

Where are you writing these commands????

Ответить
Deane Marks
Deane Marks - 22.02.2023 23:25

How about dfs to dba and vice versa

Ответить
ProSpase
ProSpase - 05.02.2023 21:30

is it possible to do this in pycharm community edition?

Ответить
Mr. Sith
Mr. Sith - 26.10.2022 10:35

Excellent as always, Tim!

Ответить
DAT official
DAT official - 21.10.2022 15:04

Very basic. LOVE IT!

Ответить
Sai Koushik
Sai Koushik - 04.09.2022 11:36

Thank you so much bro

Ответить
Blue Space
Blue Space - 26.08.2022 21:26

Only 1m subs??? you deserve more

Ответить
Data Science with Charaf
Data Science with Charaf - 24.07.2022 23:09

How can I make SQL scripts colored like yours please (I'm using PyCharme) !!

Ответить
shank sharma
shank sharma - 30.05.2022 16:21

can you provide tutorial for Sqlite3?

Ответить
Gandalf Grey
Gandalf Grey - 11.05.2022 04:41

how do you get that CLEAN syntax highlighting for mysql?

Ответить
Adam Chavez
Adam Chavez - 21.04.2022 19:40

SELECT * FROM Person is only returning the first tuple for me. Not sure why. If I were to use MySQL directly, that'd work as intended

Ответить
The Nature Lover
The Nature Lover - 07.04.2022 14:04

nice work bro...thank u sooo much...👌👌👌👌👍👍👍

Ответить
captainyaptin
captainyaptin - 24.03.2022 08:56

Is there any way you could make a quick video explaining how to do this with a Django project? Thank you!

Ответить
Allegra Filici
Allegra Filici - 08.03.2022 01:28

tim you have no idea how much you've saved me with your videos, THANK YOU SO SO SO MUCH

Ответить
Eric Rosenberg
Eric Rosenberg - 13.02.2022 09:18

Fantastic tutorial, thanks! 👍

Ответить
Stephen Fulmer
Stephen Fulmer - 29.01.2022 22:56

This video didn't make any sense. The lines of code written for some reason do not work. Why is this so difficult!?

Ответить
muhammed fadhi
muhammed fadhi - 12.01.2022 18:58

the way you explain... amazing...

Ответить
Sébastien Gagneux
Sébastien Gagneux - 05.11.2021 11:13

Hello TIm! Your videos are very helpful in my daily work. Thanks.
There is one topic that I am sure you can answer and will be very usefull for the community (and me as well :) ). it is about reading data from SQL in GO. Ex: I cannot find any answer about using the join method in sql for reading 2 tables, but in GOLANG. always based on 1 table.

Ответить
INSANE _1904
INSANE _1904 - 17.10.2021 17:14

Bro I can't create 2 table in a single prog.
Can u give a small example on how to do it.

Ответить
W Sanders
W Sanders - 05.10.2021 19:07

Excellent. Thank you

Ответить
Bruce Scott
Bruce Scott - 04.10.2021 06:27

For some reason the commit isn't working for me, I'm not getting errors, but my db is not being updated.

Ответить
Arnav Khandelwal
Arnav Khandelwal - 28.09.2021 13:43

Thank you !! ur help has been helpful

Ответить
Óscar García Hinde
Óscar García Hinde - 23.09.2021 16:26

I'm getting into SQL after neglecting it for years (didn't really need it in my job as an academic researcher) and your tutorials got me up and running in no time. Cheers mate!

Ответить
BpYTutor
BpYTutor - 29.08.2021 21:02

I really love you brother. I feel comfortable when I heard you. Best explanation...

Ответить
Hassan Prince Of The Yes
Hassan Prince Of The Yes - 06.08.2021 20:17

For your information a pizza has 2,269 calories, idk what pizzas you eating, but like hand em over

Ответить
Sarthak Kavidayal
Sarthak Kavidayal - 15.06.2021 19:47

why are we using %s for integer value as well?
%d is used for the integer value.

Ответить
StatTrakDiamondSword
StatTrakDiamondSword - 03.06.2021 23:14

I'm not getting any errors, but the data isn't going to the database (ClearDB)

Ответить
Matthias Burger
Matthias Burger - 30.05.2021 22:56

Screw this. I want a pizza now.

Ответить
CarryOnn!
CarryOnn! - 21.04.2021 10:19

thanks buddy it helped a lot...

Ответить
Aradog321
Aradog321 - 16.04.2021 20:39

2.35

Ответить
Radio_Electronics
Radio_Electronics - 05.04.2021 13:36

How can I insert "curdate()"? It says Incorrect date value...

Ответить
Uncommon Charlie
Uncommon Charlie - 05.04.2021 09:02

Hi Tim , This video is really good. I'm stuck in one spot. When I tried to create the table I got an error that I have a reference error: weakly referenced object no longer exists. Do you know how to fix this? I've looked everywhere but nothing seems to be working.

Ответить
Kalpan Talukder
Kalpan Talukder - 15.03.2021 00:30

you are a genius.

Ответить
Regna Bourke
Regna Bourke - 20.02.2021 14:32

String formatting in MySQL requires a minimum of (%s,%s) otherwise this throws an error. A single (%s) will not work.

Ответить
Abinaya s
Abinaya s - 14.02.2021 21:34

Or any compiler

Ответить
Abinaya s
Abinaya s - 14.02.2021 21:34

Ur using mysql appa

Ответить
Samuel Ikefuna
Samuel Ikefuna - 06.02.2021 06:51

What software is this please?

Ответить
kasyap dharanikota
kasyap dharanikota - 04.02.2021 15:41

very helpful video

Ответить
J H
J H - 29.12.2020 19:17

absolute great tutorial! so simple and easy to understand! Could you number your videos in the playlist? Might make it easier for people to follow along

Ответить
Darnell Hill
Darnell Hill - 28.12.2020 03:42

Video super helpful!!! I am using the pymysql library, and I could not figure out why my inserts weren't reflecting on my MySQL DB.... I forgot to commit the changes. I made use of the autocommit expression. Thanks!!!

Ответить
Geethanjali Ravichandhran
Geethanjali Ravichandhran - 17.12.2020 10:53

Thankyou tim

Ответить
Chris McCron
Chris McCron - 31.10.2020 03:35

Thanks for the videos on this. It helped me out quite a bit with linking up mySQL and Python for a project I am working on.

Ответить
Jonathan
Jonathan - 27.10.2020 22:30

hello, I've been following your channel for sometime now. thanks for the uploads and great explanations.

Where did you learn how to code? I am starting out on my own and would like some recommendations if you dont mind! Thanks again!

Ответить