#11 PostgreSQL - Update Array Element using update statement.
Автор: Software Nuggets
Загружено: 6 апр. 2023 г.
Просмотров: 309 просмотров
In this tutorial, we will cover how to create a temporary table, insert data into it, and update that data. Specifically, we will be working with a table called "nuggets" that has columns for site and metals. The metals column contains an array of different types of metals found at each site.
First, we will show you how to use the array_position function to search for a specific metal, in this case, copper, and return the site where it is found. Next, we will demonstrate how to update the data in the "nuggets" table, specifically changing the value of the second item in the array for the "colorado range" site from "cooper" to "copper".
But wait, there's more! We will also cover how to use transactions, specifically beginning a transaction, rolling back a transaction, and then successfully updating the data in the "nuggets" table. So if you're ready to learn some SQL and how to manipulate data in PostgreSQL, be sure to watch this video and follow along step-by-step!
@SoftwareNuggets, #softwarenuggets, #softwareNuggetsShorts, #postgresql, #postgresqlShorts,

Доступные форматы для скачивания:
Скачать видео mp4
-
Информация по загрузке: