0
UPDATE STUDENT
    -> SET NAME='JAIN' AND MAJOR='BIOLY'
    -> WHERE MAJOR='BIO';

ERROR 1292 (22007): Truncated incorrect DOUBLE value: 'JAIN'

Arulkumar
  • 12,966
  • 14
  • 47
  • 68

1 Answers1

1

You have an syntax error.

When more than one column to be updated use , instead of AND

So the query should be as

UPDATE STUDENT
SET NAME='JAIN', MAJOR='BIOLY'
WHERE MAJOR='BIO';
James
  • 1,819
  • 2
  • 8
  • 21