Oracle data types and C # mapping relationships

Source: Internet
Author: User

Most types of correspondence: Original: http://2143892.blog.51cto.com/2133892/499353

Serial number

Oracle data types

. NET Type

Getoraclevalue type

DbType

OracleType

1

BFILE

Byte[]

OracleBFile

BFile

2

Blob

Byte[]

OracleLob

Blob

3

CHAR

String

OracleString

Ansistringfixedlength

Char

4

Clob

String

OracleLob

Clob

5

DATE

Datetime

OracleDateTime

Datetime

Datetime

6

FLOAT

Decimal

OracleNumber

Single, Double, Decimal

Float, Double, number

7

INTEGER

Decimal

OracleNumber

SByte, Int16, Int32, Int64, Decimal

SByte, Int16, Int32, number

8

INTERVAL year to MONTH

Int32

OracleMonthSpan

Int32

Intervalyeartomonth

9

INTERVAL Day to SECOND

TimeSpan

OracleTimeSpan

Object

Intervaldaytosecond

10

LONG

String

OracleString

Ansistring

LongVarChar

11

LONG RAW

Byte[]

OracleBinary

Binary

Longraw

12

NCHAR

String

OracleString

Stringfixedlength

NChar

13

NCLOB

String

OracleLob

NClob

14

Number

Decimal

OracleNumber

VarNumeric

Number

15

NVARCHAR2

String

OracleString

String

NVarChar

16

RAW

Byte[]

OracleBinary

Binary

RAW

17

ROWID

String

OracleString

Ansistring

Rowid

18

TIMESTAMP

Datetime

OracleDateTime

Datetime

Timestamp

19

VARCHAR2

String

OracleString

Ansistring

VarChar

number is the most varied type : Original: http://www.cnblogs.com/xuzhiwei/p/3998446.html

Cle db2/400 C C# c/c# Data range
Number Float (n)/real/double Double Double

1.7E +/-308 (digits)

Number (p)
P<=4
Samllint
DECIMAL (P)
Number (p)
Short Int16

–32,768 to 32,767

Number (5)

Number (p)
5<=p<=9
INTEGER
DECIMAL (P)
Number (p)
Int Int32

–2,147,483,648 to 2,147,483,647

Number (10)

Number (p)
10<=p<=19
BIGINT
DECIMAL (P)
Number (p)
__int64 Int64

–9,223,372,036,854,775,808 to 9,223,372,036,854,775,807

Number (19)

Number (P,s)
P=7 s=3
Float (N)
DECIMAL (P,s)
Number (P,s)

Float
Float

3.4E +/-(7 digits)

Number (P,s)
P=15 s=5
REAL
DECIMAL (P,s)
Number (P,s)
Double Double

1.7E +/-308 (digits)

Number (P,s)
P=15 s=5
DOUBLE
DECIMAL (P,s)
Number (P,s)
Double Double

1.7E +/-308 (digits)

Oracle does not have a Boolean type, so with number (1), storage 1,0 is converted to Boolean in the program.

Oracle data types and C # mapping relationships

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.