How many bytes has a decimal (18.8)

Asked

Viewed 48 times

2

How do I calculate the number of bytes of one decimal? In my decimal case (18.8).

Why decimal (18.8)? A: Because I will save exact values for bitcoin in my BD

Recommends a better way than decimal(18,8)?

  • 1

    What is the context of your question? Why do you need to know this? Do you want to know about C# or SQL Server? How do we tell why to use decimal(18,8) if you’re using don’t know? What really matters in that?

  • 2

    Because I’m curious and I want to know how much you occupy in memory.

  • Has 8 bytes....

  • 3

    According to Microsoft documentation for SQL Server: 9 bytes. [https://docs.microsoft.com/en-us/sql/t-sql/data-types/decimal-and-numeric-transact-sql?view=sql-server-2017]

  • Thank you anonymously, vlw!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.