I searched for a while and can't get an answer.
Why this doesn't work? ALTER TABLE mytable ALTER COLUMN price DOUBLE
In addition, you can change most data types when a field contains data. However, depending on the original data type and the new data type that you want to use, Access might truncate or delete some data, or it may not allow the conversion at all.
You can use built-in procedure sp_columns. It will return all the table metadata including column name, data type, column length etc. for a given table.
The ALTER COLUMN command is used to change the data type of a column in a table.
The syntax is incorrect and there is no DOUBLE datatype in Sybase.
So, you may try it like this:
ALTER TABLE mytable MODIFY price float
To alter any table in order to change the datatype of some field :ALTER TABLE <table_name> MODIFY <column_name> <new_datatype>
For example:
In order to change the datatype of any column 'emp_id' from int to varchar, you need to :ALTER TABLE employee MODIFY emp_id varchar(10)
Isn't it simple ?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With