I was working on a MySql project. The table actually has 4 rows.I'm only inserting into one of the rows.
insert into items(Item_code) values('X01'),('X02'),('X03'),('X04'),('X05'),('X06'),('X07'),('X08'),('X09'),('X10') on duplicate key update item_code=values(item_code);
I got hit by this error "ERROR 1364 (HY000): Field 'Item_name' doesn't have a default value" Item_name is another column in the same table pls help me!!
i tried to change it and give the whole column names
insert into items(Item_code,Item_name,Qty,Price) values('X01'),('X02'),('X03'),('X04'),('X05'),('X06'),('X07'),('X08'),('X09'),('X10') on duplicate key update item_code=values(item_code);
when another error shows up "ERROR 1136 (21S01): Column count doesn't match value count at row 1"
Please someone help me. Also can u make it light because i have just started to use MySQL