Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alter a field 1

Status
Not open for further replies.

Jblain22

Programmer
Jul 10, 2001
4
0
0
US
I need to change a field in a mysql table

table name hr_data
column name Reason4Leaving1

right now the column is char(30) and I need it to be
char(100)

This is what I have tried and it throws a syntax error:


Alter table hr_data modify Reason4Leaving1 char(100)
 
ALTER TABLE hr_data CHANGE Reason4Leaving1 Reason4Leaving1 CHAR (100) DEFAULT '0' not null


should do the trick
 
This gave me the syntax error

syntax error near unexpected token `char(1'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top