1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| drop table if exists t_e_action_act
;
drop table if exists t_e_cours_crs
;
CREATE TABLE t_e_action_act
( act_id integer generated by default as identity primary key
, act_isin char(12) NOT NULL
, act_suivi boolean
)
;
CREATE TABLE t_e_cours_crs
( crs_id integer primary key
, crs_isin char(12) NOT NULL unique
)
;
insert into t_e_action_act (act_isin, act_suivi)
values ('00000000001', true)
, ('00000000002', false)
, ('ABCDEF00000', false)
, ('ABABABABABAB', true)
, ('TOTO_ET_TITI', true)
;
insert into t_e_cours_crs (crs_id, crs_isin)
select act_id
, act_isin
from t_e_action_act
where act_suivi is true
; |
Partager