which data type will be suitable for store these data ?

ahmed salah 3,216 Reputation points
2022-06-03T17:06:30.903+00:00

I work on sql server 2017 i face issue which data type will be suitable for these data type
so are using decimal or float or which data type will be suitable for save data actually as it is

my data sample as below

MinFeatureValueNormalized
10000000
8
1
1
10000000
8
1
1
10000000
14
1
1
10000000
17
1
1
10000000
21
1
1
10000000
8
1
1
10000000
8
1
1
10000000
14
1
1
10000000
17
1
1
10000000
21

0.0000001
0.00001
0.0000001
0.00001
0.0000001
0.00001
0.0000001
0.00001
150
100
1.35
1.35
1.25
1.25
23
24
25
1.5
26
1.1
2.5
1.5
1001
1001
1001
1002
500000000
161
162
2510000000
161
162
5100000000
161
162
6100000000
SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,765 questions
Transact-SQL
Transact-SQL
A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
4,555 questions
{count} vote

3 answers

Sort by: Most helpful
  1. Yitzhak Khabinsky 25,106 Reputation points
    2022-06-03T17:55:27.343+00:00
    2 people found this answer helpful.

  2. Tom Phillips 17,716 Reputation points
    2022-06-03T17:28:48.467+00:00

    You should never use Float unless you can have some small errors in your numbers. Float is an "approximation" of a number and may not always represent exactly what you put in.

    1 person found this answer helpful.

  3. Erland Sommarskog 101.4K Reputation points MVP
    2022-06-03T21:36:56.957+00:00

    I would say that it depends on what the date represents. If they are measurements from a device, float makes perfect sense. If it is financial data, less so.

    1 person found this answer helpful.
    0 comments No comments