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.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Oct 12, 2013, 2:34 AM
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.