0
0
MAManuel Antunes
The code inserts three new columns into the perspectives table, each representing a different entity: an entitye (E1 in this case), month of the year (9 in this case), and budgeted expenditure in Euros (1200 in this case). The generated by default column is then given the entity's id.
ALTER TABLE perspectives ALTER COLUMN id
ADD GENERATED BY DEFAULT AS IDENTITY
insert into perspectives
(entite,mois,budget,depense,compte,exercice)
VALUES('E1','09',1200,300,'62351','2022'),
('E1','09',800,300,'64351','2022'),
('E1','09',999,455,'62351','2022'),
('E1','09',8976,300,'60711','2022')