How do I (or can I) SELECT DISTINCT on multiple columns?
I need to retrieve all rows from a table where 2 columns combined are all different. So I want all the sales that … Read more
I need to retrieve all rows from a table where 2 columns combined are all different. So I want all the sales that … Read more
I need to check (from the same table) if there is an association between two events based on date-time. One set of data … Read more
Basically, I want to do this: update vehicles_vehicle v join shipments_shipment s on v.shipment_id=s.id set v.price=s.price_per_vehicle; I’m pretty sure that would work in … Read more
I have to update a field with a value which is returned by a join of 3 tables. Example: select im.itemid ,im.sku as … Read more
I want to update a column in a table making a join on other table e.g.: UPDATE table1 a INNER JOIN table2 b … Read more
I’m trying to update the column visited to give it the value 1. I use MySQL workbench, and I’m writing the statement in … Read more
I have a database with account numbers and card numbers. I match these to a file to update any card numbers to the … Read more
I need to update this table in SQL Server with data from its ‘parent’ table, see below: Table: sale id (int) udid (int) … Read more