469,636 Members | 1,766 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,636 developers. It's quick & easy.

Alter Column Type.

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
Jul 20 '05 #1
1 8025

"luc h" <lh************@hotmail.com> wrote in message
news:d4**************************@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
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by deepgun74 | last post: by
3 posts views Thread by Kimi | last post: by
7 posts views Thread by Serge Rielau | last post: by
3 posts views Thread by Gregor Kovańć | last post: by
3 posts views Thread by sparks | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.