Top Posts
Gửi mail trong Magento 2 – Đính kèm...
Tạo grid trong Magento 2 sử dụng block
Tạo form admin sử dụng block
Cách sử dụng insertListing trong Magento 2
Compile LESS file với Grunt trong Magento 2
Magento 2 get product image url
Format price với currency trong Magento 2
Magento 2 Add URL Rewrite programmatically
Magento 2 Upload image admin form
Magento 2 Create Category Attribute
vi-magento.com
  • Magento 2
    • Magento 2 cơ bản
    • Bài tập Magento 2
    • Magento 2 Api
  • PHP
  • JavaScript
  • Cơ sở dữ liệu
    • Học MongoDB
    • SQL Server
    • Mysql
    • Học Oracle
    • SQLite
  • Liên hệ
  • Trắc nghiệm Magento 2
Trang chủ Cơ sở dữ liệuHọc Oracle Data types trong Oracle
Học Oracle

Data types trong Oracle

bởi admin 17/07/2021
bởi admin 17/07/2021 0 Bình luận 1219 xem

Để tối ưu trong việc lưu trữ thì Oracle phân chia dữ liệu thành nhiều loại khác nhau, mỗi loại sẽ có đồ dài nhất định và phù hợp với từng trường hợp. Chúng ta có các nhóm chính như: character, numeric, date/time, LOB and rowid datatypes.

Vì dịch ra tiếng Việt sẽ dài dòng và khó hiểu nên mình giữ nguyên tiếng Anh nhé.

Danh mục

  1. 1. Character Datatypes
  2. 2. Numeric Datatypes
  3. 3. Date/Time Datatypes
  4. 4. Large Object (LOB) Datatypes

1. Character Datatypes

Character Datatypes hay còn gọi là kiểu dữ liệu kí tự, nó là kiểu chuỗi và mỗi kiểu sẽ có độ dài khác nhau.

Data Type Syntax Oracle 9i Oracle 10g Oracle 11g
char(size) 2000 bytes. 2000 bytes. 2000 bytes.
nchar(size) 2000 bytes. 2000 bytes. 2000 bytes.
nvarchar2(size) 4000 bytes. 4000 bytes. 4000 bytes.
varchar2(size)

4000 bytes.

32KB in PLSQL.

4000 bytes.

32KB in PLSQL.

4000 bytes.

32KB in PLSQL.

long 2GB. 2GB. 2GB.
raw 2000 bytes. 2000 bytes. 2000 bytes.
long raw 2GB. 2GB. 2GB.

2. Numeric Datatypes

Data Type Syntax Oracle 9i Oracle 10g Oracle 11g
number(p,s) range from 1 to 38.
Scale can range from -84 to 127.
range from 1 to 38.
Scale can range from -84 to 127.
range from 1 to 38.
Scale can range from -84 to 127.
numeric(p,s) range from 1 to 38. range from 1 to 38. range from 1 to 38.
float
dec(p,s) range from 1 to 38. range from 1 to 38. range from 1 to 38.
decimal(p,s) range from 1 to 38. range from 1 to 38. range from 1 to 38.
integer
int
smallint
real
double precision

3. Date/Time Datatypes

Data Type Syntax Oracle 9i Oracle 10g Oracle 11g
date between Jan 1, 4712 BC and Dec 31, 9999 AD. between Jan 1, 4712 BC and Dec 31, 9999 AD. between Jan 1, 4712 BC and Dec 31, 9999 AD.
timestamp (fractional seconds precision) number between 0 and 9. (default is 6) number between 0 and 9. (default is 6) number between 0 and 9. (default is 6)
timestamp (fractional seconds precision) with time zone numberr between 0 and 9. (default is 6) number between 0 and 9. (default is 6) number between 0 and 9. (default is 6)
timestamp (fractional seconds precision) with local time zone number between 0 and 9. (default is 6) number between 0 and 9. (default is 6) a number between 0 and 9. (default is 6)
interval year
(year precision)
to month
number of digits in the year. (default is 2) number of digits in the year. (default is 2) number of digits in the year. (default is 2)
interval day
(day precision)
to second (fractional seconds precision)

number between 0 and 9. (default is 2)
number between 0 and 9. (default is 6)

number between 0 and 9. (default is 2)
number between 0 and 9. (default is 6)

number between 0 and 9. (default is 2)
number between 0 and 9. (default is 6)

4. Large Object (LOB) Datatypes

Data Type Syntax Oracle 9i Oracle 10g Oracle 11g
bfile Maximum file size of 4GB. Maximum file size of 232-1 bytes. Maximum file size of 264-1 bytes.
blob Store up to 4GB of binary data. Store up to (4 gigabytes -1) * (the value of the CHUNK parameter of LOB storage). Store up to (4 gigabytes -1) * (the value of the CHUNK parameter of LOB storage).
clob Store up to 4GB of character data. Store up to (4 gigabytes -1) * (the value of the CHUNK parameter of LOB storage) of character data. Store up to (4 gigabytes -1) * (the value of the CHUNK parameter of LOB storage) of character data.
nclob Store up to 4GB of character text data. Store up to (4 gigabytes -1) * (the value of the CHUNK parameter of LOB storage) of character text data. Store up to (4 gigabytes -1) * (the value of the CHUNK parameter of LOB storage) of character text data.

Trên là danh sách các kiểu dữ liệu trong Oracle, mình cũng không muốn dịch ra tiếng việt vì dài dòng lắm, bạn tự tham khảo nhé.

Chia sẻ
0
FacebookSkype
Bài trước
Tìm hiểu Trigger trong Oracle
Bài tiếp theo
Khai báo biến với DECLARE trong Oracle

Related Posts

Lệnh lặp LOOP trong Oracle

17/07/2021

Hàm Hàm CONVERT trong Oracle

17/07/2021

Bài tập tổng hợp Oracle SQL căn bản

17/07/2021

Hướng dẫn cài đặt Oracle 9i có hình...

17/07/2021

Các lệnh quản lý View trong Oracle

17/07/2021

Lệnh Delete trong Oracle

17/07/2021

Hàm Hàm SQRT trong Oracle

17/07/2021

Hàm Hàm CURRENT_DATE trong Oracle

17/07/2021
0 0 vote
Đánh giá
Login
guest
guest
0 Comments
Inline Feedbacks
View all comments

Bài viết cùng chủ đề

  • Oracle là gì? Các phiên bản của Oracle

  • Lệnh tạo bảng trong Oracle – Create Table

  • Lệnh sửa bảng trong Oracle – Alter Table

  • Lệnh xóa bảng trong Oracle – Drop Table

  • Tìm hiểu Temporary tables trong Oracle

  • Các lệnh quản lý View trong Oracle

  • Lệnh SELECT trong Oracle

  • Lệnh INSERT trong Oracle

  • Lệnh Delete trong Oracle

  • Lệnh Update trong Oracle

  • Lệnh Truncate Table trong Oracle

  • Loại bỏ dữ liệu trùng lặp với lệnh DISTINCT trong Oracle

  • Chọn nhiều bảng tại lệnh From trong Oracle

  • Sắp xếp kết quả với lệnh ORDER BY trong Oracle

  • Gộp kết quả với lệnh Group By trong Oracle

  • Lọc kết quả ở Group By với lệnh Having trong Oracle

  • Toán tử UNION ALL trong Oracle

  • Toán tử UNION trong Oracle

  • Toán tử INTERSECT trong Oracle

  • Toán tử MINUS trong Oracle

  • Các loại JOIN trong Oracle

  • Inner Join trong Oracle

  • Outer Join trong Oracle

  • Tìm hiểu Self Join trong Oracle

  • Xử lý trùng tên với AS trong Oracle

  • Tìm hiểu Procedure trong Oracle

  • Tìm hiểu Function trong Oracle

  • Tìm hiểu Cursor trong Oracle

  • FOR LOOP trong Oracle

  • Lệnh GOTO trong Oracle

  • Lệnh IF THEN ELSE trong Oracle

  • Lệnh lặp LOOP trong Oracle

  • Tìm hiểu Trigger trong Oracle

  • Vòng lặp WHILE LOOP trong Oracle

  • Danh sách Comparison Operators trong Oracle

  • Khai báo biến với DECLARE trong Oracle

  • Comment trong Oracle

  • Thêm nhiều điều kiện với AND và OR trong Oracle

  • Tìm hiểu IN và NOT IN trong Oracle

  • Tìm hiểu BETWEEN trong Oracle

  • Lệnh LIKE và NOT LIKE trong Oracle

  • Bài tập tổng hợp Oracle SQL căn bản

  • Lệnh điều kiện IS NULL và IS NOT NULL trong Oracle

  • Kiểm tra điều kiện với REGEXP_LIKE trong Oracle

  • Giải bài tập tổng hợp Oracle SQL căn bản

  • Tìm hiểu Transaction trong Oracle

  • Tìm hiểu Subquery trong Oracle

  • Bảng định dạng ngày tháng trong Oracle

  • Bài giảng hệ quản trị CSDL Oracle – Ths Kim Phụng

  • Giáo trình Oracle thực hành những tác vụ – Nguyễn Hữu Trọng

  • Tải luận văn tìm hiểu Oracle Form và xây dựng ứng dụng

  • Hướng dẫn cài đặt Oracle 9i có hình ảnh

  • Tổng hợp 30 câu truy vấn hữu ích trong Oracle

  • Thiết lập ID tăng tự động trong Oracle

  • Hướng dẫn cài đặt Oracle 12c trong 12 bước, kèm hình ảnh

  • Lệnh CASE trong Oracle

  • Tìm hiểu Sequence trong Oracle

  • Hàm Hàm CURRENT_DATE trong Oracle

  • Hàm Hàm ADD_MONTHS trong Oracle

  • Hàm Hàm TRUNC trong Oracle

  • Hàm Hàm SQRT trong Oracle

  • Hàm Hàm MIN trong Oracle

  • Hàm Hàm MAX trong Oracle

  • Hàm Hàm FLOOR trong Oracle

  • Hàm Hàm CEIL trong Oracle

  • Hàm Hàm COUNT trong Oracle

  • Hàm Hàm ACOS trong Oracle

  • Hàm Hàm ABS trong Oracle

  • Hàm Hàm TO_DATE trong Oracle

  • Hàm Hàm TO_CHAR trong Oracle

  • Hàm Hàm REGEXP_INSTR trong Oracle

  • Hàm Hàm NCHR trong Oracle

  • Hàm Hàm LTRIM trong Oracle

  • Hàm Hàm LPAD trong Oracle

  • Hàm Hàm LOWER trong Oracle

  • Hàm Hàm LENGTH2 trong Oracle

  • Hàm Hàm LENGTH trong Oracle

  • Hàm Hàm INSTRC trong Oracle

  • Hàm Hàm INSTRB trong Oracle

  • Hàm Hàm INSTR4 trong Oracle

  • Hàm Hàm INSTR2 trong Oracle

  • Hàm Hàm INITCAP trong Oracle

  • Hàm Hàm INSTR trong Oracle

  • Hàm Hàm DUM trong Oracle

  • Hàm Hàm DECOMPOSE trong Oracle

  • Hàm Hàm CONVERT trong Oracle

  • Hàm Hàm COMPOSE trong Oracle

  • Hàm Hàm CHR trong Oracle

  • Hàm Hàm CONCAT trong Oracle

  • Hàm Hàm ASCIISTR trong Oracle

  • Hàm Hàm ASCII trong Oracle

@2020 - All Right Reserved. vi-magento.com

vi-magento.com
  • Magento 2
    • Magento 2 cơ bản
    • Bài tập Magento 2
    • Magento 2 Api
  • PHP
  • JavaScript
  • Cơ sở dữ liệu
    • Học MongoDB
    • SQL Server
    • Mysql
    • Học Oracle
    • SQLite
  • Liên hệ
  • Trắc nghiệm Magento 2
wpDiscuz