Sir, what is differnce between numeric(18,0) and int?
suppose I have a column named studentId. In the declaration below, which perform faster?
studentId numeric(18,0).
studentId int.
Difference between numeric(18,0) and Int
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.


VulpesRank #55 · 29.2K reputationPosted Oct 11, 2013, 10:34 PM EDT
The numeric(18, 0) can store both integers and decimal numbers with a precision of up to 18 digits. The range is (approximately) plus or minus 10^38. It requires 9 bytes of storage.
int is much faster than numeric(18,0) but, as you will gather from the above, has a much smaller range and can't handle numbers with a decimal point.