In plaats van double
je kunt proberen NUMBER (precision, scale)
. te gebruiken . Dus probeer zoiets als dit:
CREATE TABLE Player(
Plyr_ID int NOT NULL PRIMARY KEY,
Plyr_Fname NVARCHAR2(20),
Plyr_Sname NVARCHAR2(20),
Plyr_DOB date,
Plyr_Height NUMBER(7,2), --Change as per your requirement.
Plyr_Weight NUMBER(7,2),
Plyr_position NVARCHAR2(20),
Plyr_experience int,
Team_ID INT NOT NULL,
CONSTRAINT fk_Team FOREIGN KEY (Team_ID) references Team(Team_ID)
);
OPMERKING :double precision
is ANSI-ondersteunde datatypes terwijl NUMBER
is Oracle ingebouwde datatypes
Dus als je wilt, kun je je aan het dubbele houden met precisie als:
CREATE TABLE Player(
Plyr_ID int NOT NULL PRIMARY KEY,
Plyr_Fname NVARCHAR2(20),
Plyr_Sname NVARCHAR2(20),
Plyr_DOB date,
Plyr_Height DOUBLE PRECISION,
Plyr_Weight DOUBLE PRECISION,
Plyr_position NVARCHAR2(20),
Plyr_experience int,
Team_ID INT NOT NULL,
CONSTRAINT fk_Team FOREIGN KEY (Team_ID) references Team(Team_ID)
);