UPDATE and DELETE – SQLite3 with Python 3 part 5



Up to this point with our SQLite and Python tutorial series, you have been shown how to create a database, a table, how to insert data, and how to read data. In this tutorial, we’re going to talk about how to modify existing data, as well as how to delete data.

It is important to note that there are no undos when it comes to SQL. Once you delete something, or once you modify it, that’s that. Take your time, read over, and re-read your queries before you do them!

Sample code and text tutorial:

Playlist:

Nguồn: https://benjaminjcohen.com/

Xem thêm bài viết khác: https://benjaminjcohen.com/cong-nghe/

30 Comments

  1. Thanks , very good. Please I have a question. How I can insert output of radio button to a database using sqlite3

  2. Thank u man😍😍😍

  3. can i insert multiple image to sqlite ???

  4. Probably you don't need this anymore, but if someone will see this video and comment, I suppose that the c.fetchall() returns a queue, so every time that you get a row out from this queue, you are deleting it from the memory or something like that. Just google queue in python for more info; i'm not expert in this, but this is interesting to know.

  5. One line print without pep8 screams:
    print(*c.fetchall(), sep=“n”)

  6. Great tutorials, as always. Just wondering why at 4:11 three of the 8.0's you selected did not get replaced with 99.0's.

  7. Please don't tell me you used a list comprehension to do "one line for loops" 😛

  8. great tutorial! Imma subsrciped.

  9. how to delete something that user gave you, for example i asked user to input a name then i wanna delete that name from table

  10. If I ever see you in person, please let me buy you a meal and get your autograph as the GOAT for YT tutorials!!!

  11. Hi Harrison, i watched all your sqlite tutorials and that was very helpful for me as a beginner .. thank you very match 😉

  12. Nice video, I want to create for database connection, I have created with below code but not succeed
    import pyodbc

    def connect():

    conn = pyodbc.connect('Driver={SQL Server};'

    'Server=#servername#;'

    'Database=master;'

    'Trusted_Connection=yes;')

    cur= conn.connection()

    return cur,conn

  13. keep doing. great. i'm looking for next video

  14. I couldnt get the thing to fully work
    the LIMIT thing didnt work for me

  15. Thank you so much for your series…

  16. Maybe appending the database values to the variable DATA would've helped i think so

  17. Sooo happy finishing tutorial basics 🙂

  18. Thanks friend. Great tutorial! & RIP Your Keyboards T_T

  19. Why not send 'c' to populate mars instead of sending our own precious adventurers to their doom?

  20. I've just found your channel just today, after viewing you saying about Udemy stealing your stuffs;

    Is this series, contains only 5 videos!?
    I heard about 68+ videos, am I right!?

  21. @9:40 sorry, I'm lol'ing at seeing Sentex hit the same problem I did while experimenting.

    c.fetchall() = empty iterator after you have run it once. result looks similar to a list but isn't a list.
    park the result of c.fetchall() in an object, then reference the object.
    https://docs.python.org/2/library/sqlite3.html

  22. I have watched your entire series and learned a lot. Thank you from Pakistan.

  23. please make a video using sqlite with tkinter to make a basic database app

  24. Hey, just wanted to say you're doing a great job on these tutorials. You've got a sub and i just got myself a sudo apt-get upgrade from your site. I'm also following the course on udemy, but this one is more fitting to me, i like the way you get "to the point". Being an IT engineer as profession it's easier if someone just gets to the point instead of explaining it as if you were a 5 year old (like the guy on udemy does) 😀

  25. how to update statement with 2 where condition?

  26. I just want to say thanks a lot for all your help. I've gone through the other 4 vids and am convinced managing sqllite is not as difficult as it seemed; not even for a beginner

  27. Thanks Harrison for such a great python series. You are really a very good teacher. Really appreciate your work. I had gone through all the python series. its very easy to understand.
    Just had problem with Threading video rest everything was like cake walk.

    Thanks again!

Leave a Reply

Your email address will not be published. Required fields are marked *