For example, if you executed the following INSERT statement:
INSERT INTO suppliers
(supplier_id, supplier_name)
VALUES
(1000, 'Microsoft', 'Bill Gates');
In this example, you've chosen to insert values into 2 columns (supplier_id and supplier_name), but you've entered 3 values (1000, Microsoft, and Bill Gates).
You need to modify your INSERT statement so there are the same number of columns as there are values. For example:
INSERT INTO suppliers
(supplier_id, supplier_name)
VALUES
(1000, 'Microsoft');
For example, if you executed the following SQL statement:
| SELECT * FROM suppliers |
| WHERE supplier_id > 5000 |
| AND supplier_id IN |
(SELECT * FROM products |
|
WHERE product_name LIKE 'H%); |
In this example, the subquery returns all columns from the products table. You need to modify the subquery to return only one column as follows:
| SELECT * FROM suppliers |
| WHERE supplier_id > 5000 |
| AND supplier_id IN |
(SELECT product_id FROM products |
|
WHERE product_name LIKE 'H%); |