I'm having to change a column in MYSQL to NULL to NOT NULL, but I get the error excutar the syntax. I want to change only the last column, already performed some research but have not found the solution, which can be simple but I'm new to database and had not realized this until the moment. can anybody help me?
Example held: Quickly change NULL column to NOT NULL
ALTER TABLE glpi_ticketsatisfactions ALTER COLUMN comment BIGINT NOT NULL;
Error:
[42000][1064] You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'BIGINT NOT NULL' at line 1
CREATE TABLE
:
CREATE TABLE glpi_ticketsatisfactions
( id int(11) NOT NULL AUTO_INCREMENT,
tickets_id int(11) NOT NULL DEFAULT '0',
type int(11) NOT NULL DEFAULT '1',
ate_begin datetime DEFAULT NULL,
date_answered datetime DEFAULT NULL,
satisfaction int(11) DEFAULT NULL,
comment text COLLATE utf8_unicode_ci,
PRIMARY KEY (id),
UNIQUE KEY tickets_id (tickets_id)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci