近期新學了資料庫,但是講師只說了字串所占的位元組,NUMBER在資料庫中所占幾個位元組?當用NUMBER表示整數和小數時所占位元組一樣嗎?希望有大神指導一下!!!
uj5u.com熱心網友回復:
分配的位元組的數是一樣的,實際的存盤長度,以具體的資料為準;
-- 你觀察一下這個
create table test(c1 number,c2 number(18,2), c3 number(20,3));
begin
insert into test values(100,100,100);
insert into test values(1.001,1.001,1.001);
insert into test values(1.01,1.01,1.01);
end;
/
select dump(c1) c1, dump(c2) c2 , dump(c3) c3 from test;
drop table test purge;
uj5u.com熱心網友回復:
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/109188.html
標籤:基礎和管理
