-- sterge tabelul elevi, daca acesta exista
DROP TABLE elevi;

-- creez tabel elevi
CREATE TABLE elevi
 (id NUMBER(3) NOT NULL CONSTRAINT ELV_PK PRIMARY KEY,
 nume VARCHAR2(30),
 prenume VARCHAR2(50),
 datan DATE,
 clasa VARCHAR2(20),
 mgen NUMBER(5,2) CONSTRAINT mgen_ck CHECK (mgen>=1 AND mgen<=10),
 nr_abs_n NUMBER(3),
 nr_abs_m NUMBER(3),
 obs VARCHAR2(80)
);

INSERT INTO elevi VALUES ( 100, 'Avasilichioaei','Sebastian',TO_DATE('2006/07/09', 'yyyy/mm/dd'), 'X-C',7.75,9,12,NULL);
INSERT INTO elevi VALUES ( 101, 'Babu','Theodor',TO_DATE('2006/01/10', 'yyyy/mm/dd'), 'X-A',8.95,2,3,NULL);
INSERT INTO elevi VALUES ( 102, 'Badea','Timotei',TO_DATE('2006/03/11', 'yyyy/mm/dd'), 'X-F',9.85,0,0,NULL);
INSERT INTO elevi VALUES ( 103, 'Bulmaci','Felix',TO_DATE('2005/05/21', 'yyyy/mm/dd'), 'XI-C',9.07,6,8,NULL);
INSERT INTO elevi VALUES ( 104, 'Constantinescu','Mihaela',TO_DATE('2005/05/22', 'yyyy/mm/dd'), 'XI-C',7.27,3,1,NULL);
INSERT INTO elevi VALUES ( 105, 'Didelea','Cosmina',TO_DATE('2005/05/23', 'yyyy/mm/dd'), 'XI-C',6.88,32,16,NULL);
INSERT INTO elevi VALUES ( 106, 'Dinca','Ioana',TO_DATE('2005/05/27', 'yyyy/mm/dd'), 'XI-A',8.88,0,0,NULL);
INSERT INTO elevi VALUES ( 107, 'Manolea','Sebastian',TO_DATE('2008/02/07', 'yyyy/mm/dd'), 'IX-B',9.21,0,0,NULL);
INSERT INTO elevi VALUES ( 108, 'Mladin','Rares',TO_DATE('2008/03/09', 'yyyy/mm/dd'), 'IX-A',9.96,0,0,'Premiul I la O. N. de Informatica');
INSERT INTO elevi VALUES ( 109, 'Muscalu','Eduard',TO_DATE('2004/04/02', 'yyyy/mm/dd'), 'XII-A',8.73,3,6,NULL);
INSERT INTO elevi VALUES ( 110, 'Voinea','Andreea',TO_DATE('2004/04/03', 'yyyy/mm/dd'), 'XII-A',8.84,2,8,NULL);
INSERT INTO elevi VALUES ( 111, 'Iovu','Alexandru',TO_DATE('2004/04/04', 'yyyy/mm/dd'), 'XII-A',9.31,1,1,NULL);
INSERT INTO elevi VALUES ( 112, 'Pavel','Leonard',TO_DATE('2004/05/07', 'yyyy/mm/dd'), 'XII-A',9.01,2,3,NULL);
INSERT INTO elevi VALUES ( 113, 'Stancu','Felix',TO_DATE('2004/05/08', 'yyyy/mm/dd'), 'XII-A',9.81,2,3,'Premiul II la O.N. de Chimie');
INSERT INTO elevi VALUES ( 114, 'Stoe','Ioana',TO_DATE('2004/05/09', 'yyyy/mm/dd'), 'XII-A',7.89,7,21,NULL);
INSERT INTO elevi VALUES ( 115, 'Tudoran','Bristena',TO_DATE('2004/05/11', 'yyyy/mm/dd'), 'XII-A',9.09,1,2,NULL);