-1

I have a table as shown and I am trying to insert the data to it but I am constantly getting error . Can anyone suggest what should be the query ??

Here's my table structure:

country table

My insert query:

INSERT INTO country (id, country_name, iso_code, country_pic_url, rank, created_time, updated_time, deleted_time) VALUES(1, 'Afghanistan', 'AF', null, 0, '2013-09-04 13:30:00', '2013-09-04 13:30:00', '2013-09-04 13:30:00')

insert-query-error

Ankit Jindal
  • 3,672
  • 3
  • 25
  • 37
Neeraj N
  • 1
  • 1

1 Answers1

-1

Don't use null instead Put NULL in your syntax or either leave it blank.

Check if the rank you are trying to put is a string, so instead of just using 0, put '0' in your query.

Anurag Dhadse
  • 1,722
  • 1
  • 13
  • 26