-2

I need to make column called start_date_data_id to be nullable.

I found this answer(Altering a column to be nullable) and tried to do it on described way.

Description of that column: (| start_date_data_id| bigint(20)| NO | MUL | NULL | |).

Query:

ALTER TABLE attenddb.company_group_user_settings
    ALTER COLUMN start_date_data_id bigint(20) NULL;

Error:

ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'bigint(20) NULL' at line 1

Can someone tell me why is it not working?

jarlh
  • 42,561
  • 8
  • 45
  • 63
Jakov
  • 879
  • 2
  • 17
  • 36
  • @Ronald Aaronson I tried, but the same error happened. – Jakov Sep 17 '19 at 10:20
  • 1
    The accepted answer in the question you referenced is for ms sql server (it says so). Had you scrolled down a little bit in the answers, you would have found the mysql specific answer as well. Anyway, linked in another question that is mysql specific only, to avoid misunderstandings. – Shadow Sep 17 '19 at 10:25

1 Answers1

1

Try this:

ALTER TABLE attenddb.company_group_user_settings
MODIFY start_date_data_id bigint(20) NULL; 
Ankit Das
  • 640
  • 4
  • 16