UPDATE Query to change single or multiple data table & get number of rows affected by rowcount
Автор: plus2net
Загружено: 2020-12-31
Просмотров: 236
Описание:
https://www.plus2net.com/python/sqlit...
List of all Python SQLite tutorials
https://www.plus2net.com/python/pytho...
https://www.plus2net.com/python/sqlit...
By using UPDATE query we can change data of single record or more than one record. Usually WHERE condition is used to restrict the updating of data.
Update student set mark=mark+1
Above query will increase mark of all rows by 1.
UPDATE student set mark=mark+5 WHERE id=7
Above query will increase mark of student with id 7 by 5
We can change all class values to another class.
UPDATE student set class=’Six’ WHERE class=’Five’
We can use parameterized query to use any data in our query where data is taken from unknown sources. We use one tuple to pass data separately while sending the query to SQLite database.
We can get number of records updated by using rowcount. This will return us number of rows changed by using the query.
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: