By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,649 Members | 696 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,649 IT Pros & Developers. It's quick & easy.

Alter Column

P: n/a
Hi All,

Suppose I have a Float Column with a Default Value with that Column.
What is the Best way to Change the Column Type to Decimal (18,2) ?

Ex:-

Create Table EMP
(
EmpID Int Identity(100, 1),
SAL Float Default 0
)
I Want to Alter the SAL Column to Decimal(18,0). What is the Best Way?

Thanks
Prabhat


Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Prabhat" <no********@hotmail.com> schrieb:
Suppose I have a Float Column with a Default Value with that Column.
What is the Best way to Change the Column Type to Decimal (18,2) ?

Ex:-

Create Table EMP
(
EmpID Int Identity(100, 1),
SAL Float Default 0
)
I Want to Alter the SAL Column to Decimal(18,0). What is the Best Way?


Asking in an appropriate group, microsoft.public.dotnet.framework.adonet for
example.

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #2

P: n/a
Prabhat,

You mean someting as

dim mysalcolumn as decimal = CDec(dr("SAL"))

or something?

Cor

"Prabhat" <no********@hotmail.com>
...
Hi All,

Suppose I have a Float Column with a Default Value with that Column.
What is the Best way to Change the Column Type to Decimal (18,2) ?

Ex:-

Create Table EMP
(
EmpID Int Identity(100, 1),
SAL Float Default 0
)
I Want to Alter the SAL Column to Decimal(18,0). What is the Best Way?

Thanks
Prabhat

Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.