add batch remove batch split batch comment selection show hidden batches hide batch highlight batch
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TYPE T_Personne;
CREATE TYPE T_SET_Tag AS TABLE OF Varchar2(30);
CREATE TYPE T_Message AS OBJECT (
Texte Varchar2(500),
DateEcrit Date,
Tags T_SET_Tag
);
CREATE TYPE T_SET_Message AS TABLE OF T_Message;
CREATE TYPE T_Contact AS OBJECT(
Per REF T_Personne,
Depuis Date
);
CREATE TYPE T_SET_Contact AS TABLE OF T_Contact;
CREATE OR REPLACE TYPE T_Personne AS OBJECT (
Prenom Varchar2(30),
Suit T_SET_Contact,
Ecrit T_SET_Message
);
CREATE TABLE TAB_Personne OF T_Personne
NESTED TABLE Suit STORE AS TAB_suit,
NESTED TABLE Ecrit STORE AS TAB_ecrit(
NESTED TABLE Tags STORE AS TAB_Tags
);
INSERT INTO TAB_Personne VALUES(
'Baam',
T_SET_Contact(),
T_SET_Message()
);
1 rows affected
INSERT INTO TAB_Personne VALUES(
'Rachel',
T_SET_Contact(
T_Contact(
(SELECT REF(P)
FROM TAB_Personne P
WHERE P.Prenom='Baam'),
to_date('01/01/2018', 'dd/mm/yyyy')
)
),
T_SET_Message(
T_Message(
'Paris candidat aux jeux Olympiques 2022',
to_date('01/06/2019', 'dd/mm/yyyy'),
T_SET_Tag('JM2022')
)
)
);
1 rows affected