Guest User

Guest User

  • Tech Writer
  • 2.1k
  • 481.5k

There are fewer columns in the Insert statement than values?

Mar 10 2020 1:52 AM
Hi Team
 
I am running this error when i want to insert my data to the table field. The lenghth are as follows;
 
Name PK nvarchar(50)
Latitiute numeric(18,0)
Longitute numeric(18,0)
Description nvarchar(300) 
 
There are fewer columns in the INSERT statement than values specified in the VALUES clause. The number of values in the VALUES clause must match the number of columns specified in the INSERT statement.
  1. insert into dbo.Locations(Name, Latitute, Longitute, Description)   
  2. values('Port Elizabeth', 33.9608, 25.6022, 'Port Elizabeth is a city on Algoa Bay in South Africa Eastern Cape Province.',  
  3. 'Mtata', 316067, 28.7781, 'Mthatha, or Umtata, is the main town of the King Sabata Dalindyebo Local Municipality in Eastern Cape province of South Africa',  
  4. 'East London', 33.0292, 27.8546, 'East London is a city on the Indian Ocean, in South Africa’s Eastern Cape. It’s known for its beaches, such as Nahoon and Cove Rock');  

Answers (5)