472,119 Members | 2,056 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

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 8123

"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 leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.