Skip to content
Advertisement

Tag: sql-update

SQL – copy data from one table column to another table column

As you can see from the image I have a table called wpw8_postmeta where it has four columns and I have searched for the term release and got the following results. I want to copy the results (release_date [meta_value]) to another table called wpw8_test using the post_id as foreign key/primary key. The second table looks like this After the update

Postgresql:Update text column with value from another column

I’m new to postgresql and need help with an update script where I can insert the corresponding ID between path2 and the filename if there is none.This will be done on multiple records. After update only IDs 111 and 333 will be affected and the expected is /path1/path2/111/file1.png /path1/path2/333/file3.png I am using this select to get the records that need

Advertisement