Skip to content
Advertisement

Tag: sql-update

Update field with a shorter string

I need to modify the LENGTH of text in field in db mysql. I’ve attribute_name that I need to have with max LENGTH 28 characters. WordPress and woocommerce limit this field to 28 characters. Right now my website is down because some taxonomies are too long. There is a way to “cut” all attribute_name <= 28? All my attribute_name should

Assign increasing integer values to a column in mysql database

We have an application where we have some learning path and each learning path is associated with some courses. The association between learning path and courses is stored in a mysql table. Now we also want to store course position in learning path to course mapping, so I have added another column ‘position’ in the table and I want to

check for same range in postgresql

I wanted to check if for one particular student my column (Amount) contains a value less than 10, and if yes, then check if for the same student my column (Amount) is also greater than 10 and update the column new accordingly in PostgreSQL. MY table: Tried this way but not working The output I’m expecting: Answer One option is

Advertisement