Easy one for the SQL experts.
I have a simple table. For the example let's say it looks like this:
CREATE TABLE doc_exb ( column_a INT, column_b VARCHAR(20) NULL)
Now I want to alter this table and make the column column_a a float
instead of an INT.
How do I do that? I cannot DROP and ADD the column I would lose some
very precious data.
Thanks a lot"luc h" <lhovhannessian@.hotmail.com> wrote in message
news:d4175164.0402250955.2802d9e3@.posting.google.c om...
> Hello,
> Easy one for the SQL experts.
> I have a simple table. For the example let's say it looks like this:
> CREATE TABLE doc_exb ( column_a INT, column_b VARCHAR(20) NULL)
> Now I want to alter this table and make the column column_a a float
> instead of an INT.
> How do I do that? I cannot DROP and ADD the column I would lose some
> very precious data.
> Thanks a lot
See ALTER TABLE in Books Online:
alter table dbo.doc_exb
alter column column_a float
Simon
No comments:
Post a Comment