My table (employee) has this description
Field Type Null Key Default Extra
Emp_id int(4) NO PRI Null
Emp_name varchar(20) YES Null
Mgr_id int(4) YES Null
Hire_date date YES Null
Salary int(5) YES Null
Commission int(4) YES Null
Dept_id int(3) YES Null
I ran this query
alter table employee modify Emp_name not null;
but returns the 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 'Emp_name not null' at line 1
There are no null values in this field.
Any reasons.
neelam dadhwal 0 Newbie Poster
pritaeas 2,211 ¯\_(ツ)_/¯ Moderator Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.