0

I am trying to insert data through postman. My error is like below

"SQLSTATE[01000]: Warning: 1265 Data truncated for column 'salutation' at row 1 (SQL: insert into `students` (`salutation`, `fullName`, `nickname`, `studentId`, `email`, `DOB`, `maritalStatus`, `gender`, `blood_group`, `nationality`, `religion`, `mobileNumber`, `homePhone`, `officePhone`, `emergencyContactNumber`, `present_address`, `permanent_address`, `updated_at`, `created_at`) values (`Mr.`, mouse, hello, laptop, hello, 10/12/2001, Single, Male, A+(ve), dsfsd, 10, mobile, key, 123456, royak, m10, 10, 2019-05-30 10:09:16, 2019-05-30 10:09:16))"

My enum() field is like below

enter image description here

abu abu
  • 6,599
  • 19
  • 74
  • 131
  • 1
    You have backticks around the value you are trying to insert, which should be single quotes. All your other strings and date values should be enclosed in single quotes too. – Nick May 30 '19 at 04:41
  • @Nick, Single Quote `SQLSTATE[01000]: Warning: 1265 Data truncated for column 'salutation' at row 1 (SQL: insert into `students` (`salutation`, `fullName`, `nickname`, `studentId`, `email`, `DOB`, `maritalStatus`, `gender`, `blood_group`, `nationality`, `religion`, `mobileNumber`, `homePhone`, `officePhone`, `emergencyContactNumber`, `present_address`, `permanent_address`, `updated_at`, `created_at`) values ('Mr.', 'mouse', ' hello', 'laptop', 'hello', '10/12/2001', 'Single', 'Male', 'A+(ve)', 'dsfsd', 10, 'mobile', 'key', 123456, 'royak', 'm10', 10, 2019-05-30 10:52:33, 2019-05-30 10:52:33))` – abu abu May 30 '19 at 05:05
  • Works fine for me https://dbfiddle.uk/?rdbms=mysql_5.7&fiddle=656078aa31400fd3ecc9942122fe2b78 – Nick May 30 '19 at 05:18

0 Answers0