北大青鸟笔试题
22) 在Oracle中,下列()定义一个对象类型“car”,有属性“id”,“model”,“price”;功能函数“car_in_stock”。(选择一项)
A: CREATE OR REPLACE TYPE car
(
id INTEGER,
model VATCHAR2 (25).
Price NUMBER (2,10),
MEMBER FUNCTION car_in_stock (id IN INTEGER)
RETURN INTEGER
);
B:CREATE OR REPLACE TYPE car AS OBJECT
(
id INTEGER, model VARCHAR2(25),
price NUMBER (2,10),
MEMBER FUNCTION car_in_stock
(
id IN INTEGER
)
RETURN INTEGER
);
C:CREATE OR REPLACE OBJECT car (
id INTEGER,
model VARCHAR2 (25),
price NUMBER(2,10),
MEMBER FUNCTION car_in_sock
(
id IN INTEGER)
RETURN INTEGER
);
D:CREATE OR RELPLACE TYPE car
(
id INTEGER,
model VARCHAR2 (25),
price NUMBER (2,10),
MEMBER PROCEDURE car_in_stock
(
id IN INTEGER
)
RETURN INTEGER;
[解决办法]
B