I made a table this way:
mysql>create table tblCourses (courseCode char(30) primary key,
courseDescripti on char(50));
Now I realize that I forgot to enforce that both fields will not be null.
So I tried this:
mysql> alter table tblCourses (courseCode not null, courseDescripti on not
null);
but I got this result:
ERROR 1064: 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
'(courseCodenot null, courseDescripti on not null)' at line 1
Do I need to drop the table and start over? Or how could I add this?
mysql>create table tblCourses (courseCode char(30) primary key,
courseDescripti on char(50));
Now I realize that I forgot to enforce that both fields will not be null.
So I tried this:
mysql> alter table tblCourses (courseCode not null, courseDescripti on not
null);
but I got this result:
ERROR 1064: 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
'(courseCodenot null, courseDescripti on not null)' at line 1
Do I need to drop the table and start over? Or how could I add this?
Comment