Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the alternative for number(2,0) of oracle in sqlserver?

in my oracle tables some columns are having number(2,0), number(5,0) datatype, so I want to know what are the alternative datatypes in sql server for that .

like image 666
user2195726 Avatar asked Mar 21 '13 15:03

user2195726


People also ask

What can I use instead of like operator Oracle?

INSTR is another option but you cannot have an index which suits this comparison. Save this answer.

What is the difference between number and decimal in Oracle?

NUMERIC determines the exact precision and scale. DECIMAL specifies only the exact scale; the precision is equal or greater than what is specified by the coder. DECIMAL columns can have a larger-than-specified precision if this is more convenient or efficient for the database system.


2 Answers

The T-SQL equivalent is DECIMAL or NUMERIC.

Examples: NUMERIC(2, 0) and DECIMAL(5, 0)

They are functionally equivalent.

Here's a breakdown of the exact numeric types:

enter image description here

like image 90
mattytommo Avatar answered Oct 15 '22 05:10

mattytommo


Following are some alternatives in sql server

numeric(2,0)
decimal(2,0)

and as it haven't floating point you can take

int
like image 27
commit Avatar answered Oct 15 '22 04:10

commit