Skip to content
Advertisement

SQL Insert with Inner Join trying to insert into wrong column

I have an existing table of products, and I’m trying to insert new attributes from other tables into my main product table.

Here’s my query:

The error that I get is: Field ‘product_id’ doesn’t have a default value.

I’m not trying to insert into the product_id column, I’m trying to insert into the amp column (as specified on row 1 of the query)

The amp column exists on the company_attributes table, but right now, every value is NULL

Thanks

Advertisement

Answer

You may just want to update the value in existing rows. If so:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement