skip to Main Content
INSERT INTO customer_data
  (cus_id, cust_name, age, city, salary)
VALUES
  (1, 'Sam', 'Delhi',9000),
  (2, 'ROhit', 'Banglore', 5000),
  (3, 'Rahul', 'Mumbai', 12000),
  (4, 'Sunny', 'Odisha',15000);

This is my Code

2

Answers


  1. Your SQL query should contain same number of columns as same number of values
    you column count in this

    INSERT INTO customer_data (**cus_id**, **cust_name**, **age**, **city**, **salary**) 
    

    part of query is 5 whereas value count is 4 in this part

    VALUES (**1**, **'Sam'**, **'Delhi'**,**9000**) ...
    
    Login or Signup to reply.
  2. the values part is missing the age value

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search