




























































































Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!





























































































Basi di Da( 1
CHAR( size ) Fixed-‐length character data of length size bytes. Maximum size is 2000 bytes. Default and minimum size is 1 byte. NCHAR( size ) Fixed-‐length character data of length size characters or bytes, depending on the choice of na(onal character set. Maximum size is determined by the number of bytes required to store each character, with an upper limit of 2000 bytes. Default and minimum size is 1 character or 1 byte, depending on the character set. CLOB A character large object containing single-‐byte characters. Both fixed-‐width and variable-‐width character sets are supported, both using the CHAR database character set. Maximum size is 4 gigabytes. NCLOB A character large object containing mul(byte characters. Both fixed-‐width and variable-‐width character sets are supported, both using the NCHAR database character set. Maximum size is 4 gigabytes. Stores na(onal character set data. BLOB A binary large object. Maximum size is 4 gigabytes. BFILE Contains a locator to a large binary file stored outside the database. Enables byte stream I/O access to external LOBs residing on the database server. Maximum size is 4 gigabytes. 16
ANSI SQL Datatype Oracle Datatype CHARACTER(n) CHAR(n) CHAR(n) CHARACTER VARYING(n) CHAR VARYING(n) VARCHAR(n) NATIONAL CHARACTER(n) NATIONAL CHAR(n) NCHAR(n) NCHAR(n) NATIONAL CHARACTER VARYING(n) NATIONAL CHAR VARYING(n) NCHAR VARYING(n) NVARCHAR2(n) NUMERIC(p,s) DECIMAL(p,s) NUMBER(p,s) The NUMERIC and DECIMAL datatypes can specify only fixed-‐ point numbers. For these datatypes, s defaults to 0. 17
SMALLINT intero a 16 bit INTEGER intero a 32 bit DECIMAL (p,s) numero decimale con precisione p e scala (default p=5, s=0) NUMERIC(p,s) è sinonimo di DECIMAL(p,s) DOUBLE numero in virgola mobile a 64 bit FLOAT e DOUBLE PRECISION sono sinonimi di DOUBLE CHAR(n) stringa di lunghezza n, con n ≤ 254, e default = 1 VARCHAR(n) stringa di lunghezza variabile con lunghezza massima pari a n, dove n ≤ 4000 DATE anno, mese, giorno TIME ora, minuto, secondo TIMESTAMP anno, mese, giorno, ora, minuto, secondo, microsecondo 19
20