Python Basics Tutorial Sqlite SQL Unique Constraint To Have No Duplicate Entries

preview_player
Показать описание
Learn how to use sql unique constraint to ensure no duplicate user names are entered in to a sqlite table

twitter: @python_basics

#pythonprogramming #pythonbasics #pythonforever
Рекомендации по теме
Комментарии
Автор

You can’t believe how happy I am right now, thank you so much

ternietorrinque
Автор

thats awesome, cant wait to try it tuesday, i was tired of duplicating information

davidbeiler
Автор

that was so helpfull thank you for ever

KweenAhlem
Автор

Awesome tutorial, but what is PRIMARY KEY used for ?

Skirmish_Master
Автор

It's a good idea to avoid "bare" except clause, and use something like `except IntegrityError as e:` instead, in case the error wasn't what you thought it was, so it only catches the constraint failure and doesn't mask all errors with the code in the try block.

appuser
Автор

Great video! Would this work for removing duplicates from an already existing table??

jonathancrichlow
Автор

Hey great video man! Would you mind explaining to me how to replace the unique entry with the new one in the except?

jacobnotte
Автор

I made a program for username and password with pycharm and xamp database ... Every username and password entered is registered in database.
What command i should use so that if user inputs same username that's already been registered in the database, it shows error with message username already in use try different username

veer
Автор

Hi, I just watched this video while I was looking for a solution to take care of duplicate inputs in SQLite db. How can I take care of duplicate inputs in 3 columns? What I mean here is that I want to allow duplicates for one or 2 columns, but block inputs whose 3 columns are duplicate with the previous records. Hope this makes sense...

kojisera