Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Change SQL column from numeric(3,0) to numeric(6,0)
Message
From
20/12/2022 05:15:37
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01685524
Message ID:
01685530
Views:
34
As Tore and Borislav have already argued, use Int for whole numbers.

If your data model "used" {CARDINAL below 10**6} to map into (6,0):
There is always a tiny chance model will be "enhanced" by negative numbers in same range
instead of adding a new flag field into the data model(s)
esp. if there are oodles of transport protocols, which now have to be maintained.

If your data model REALLY intended for [-99999..999999], rethink ;-))
A trigger on the integer range in the backend is much better to maintain
and can be elevated to GUI valid checks whenever needed.

my 0.0022 of lazyne$$
thomas

>>>Hi,
>>>
>>>I am trying to write a code (in a .prg) that would change a SQL Server column size from numeric(3,0) to numeric(6,0). But I can't.
>>>Anyone can suggest a code to make such a column size change?
>>
>>ALTER TABLE (?)
>>https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-table-transact-sql
>
>Thank you. I will need to, first, create a t-sql command that will be used to check if the column is numeric(3,0) or (6,0). Then to ALTER the table.
Previous
Reply
Map
View

Click here to load this message in the networking platform