Im inserting Data into a database, they have a decimal and a negative number, is there a way to the DataType Decimal into negative numbers or is there another data type I can use?
The decimal
datatype can store negative numbers as well. So to answer your question, yes you can use the decimal
datatype to store negative decimal numbers.
Here is some proof:
create table NegativeDecimal
(
somedec decimal(10, 4) not null
)
go
insert into negativedecimal
select -12.3
union all
select 16.4
go
select *
from NegativeDecimal
somedec
---------------------------------------
-12.3000
16.4000
(2 row(s) affected)
EDIT: This is provided you are using SQL Server. Please specify your RDBMS.