How to change an existing table column type in Sybase?

I searched for a while and cannot get an answer.

Why is this not working? ALTER TABLE mytable ALTER COLUMN price DOUBLE

+5
source share
2 answers

The syntax is invalid and there is no DOUBLE data type in Sybase.

So you can try the following:

ALTER TABLE mytable MODIFY price float
+15
source

To change any table, to change the data type of a field:
ALTER TABLE <table_name> MODIFY <column_name> <new_datatype>
For example:
To change the data type of any emp_id column from int to varchar, you need: ALTER TABLE employee MODIFY emp_id varchar(10)
Isn't it easy?

0
source

All Articles