Which data type should you recommend?

You work at a coffee shop. They ask you to set up a website that stores charges on purchases.
You need to recommend a data type in a database table to run financial functions against the
charged amounts.
Which data type should you recommend?

You work at a coffee shop. They ask you to set up a website that stores charges on purchases.
You need to recommend a data type in a database table to run financial functions against the
charged amounts.
Which data type should you recommend?

A.
Money

B.
Bit

C.
Varchar

D.
Binary

Explanation:



Leave a Reply 3

Your email address will not be published. Required fields are marked *


john23

john23

The answer should be A. Money

RT

RT

You are working at a coffee shop. You do not need a data type that is 1/10,000 accurate and automatically uses up 8 bytes of space. A varchar will implicitly convert.

Tony

Tony

I agree that it should be Money based on these options. Even if the database will convert the values it makes more sense to use the field to hold the value specific information. When the coffee shop business grows it will need to be more accurate.