0

So i have this table:

  SELECT * FROM table LIMIT 10; 


    +----+----------------+------------+----------+----------------+--------+--------+
    | sex_id | First name | year of beginning  | year of ending  | country |    |  |
    +----+----------------+------------+----------+----------------+--------+--------+
    |  56| mimic |       1987 |     NULL | United Kingdom | Group  | NULL   |
    | 3 | charales glass     |       1941 |     NULL | United States  | Person | Male   |
    | 33| Grass |                1983 |     2000 | United Kingdom | Group  | NULL   |
    | 67| Mother       |       1989 |     2000 | United States  | Group  | NULL   |
    | 69| wind of lollie  |       1950 |     NULL | United States  | Person | Male   |
    +----+----------------+------------+----------+----------------+--------+--------+

‎‎‎‎‎‎‎ ‎‎‎‎‎‎‎‎‎‎ ‎‎‎ ‎‎‎

I t‎‎‎‎hen make the ‎‎‎table smaller to show what i want to rename which is the end year, and i want to change it to NULL.

‎‎‎‎‎ERROR 1366 (HY000): Incorrect integer value 'NULL' for column 'end_year' at row 155
1
  • 1
    Please do not vandalize your posts. By posting on the Stack Exchange network, you've granted a non-revocable right for SE to distribute that content (under the CC BY-SA 4.0 license). By SE policy, any vandalism will be reverted. Commented Dec 10, 2021 at 14:01

2 Answers 2

2

Please remove quotes from 'NULL' in your update statement.

UPDATE table_name SET row_name=NULL WHERE name='Specific name'; 
Sign up to request clarification or add additional context in comments.

Comments

0

NULL not equal varchar2,so you should try end_year=NULL

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.