Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

sql queries univercitymanagment.txt SELECT am from foithths,users where foithths.onoma_xrhsth=users.onoma_xrhsth and users.

onoma_xrhsth='"+onoma+"'; UPDATE Eksetash_"+surname+"_"+name+" set xiliostaekkinhshs='"+time+"' where xiliostaekkinhshs is NULL limit 5; SELECT am_foithth,onoma,epwnymo,hmeromhnia_ypovolhs,eidos_aithshs,status from foithths,aithseis where foithths.am=aithseis.am_foithth; select ma8hmata.am_ma8hmatos,ma8hmata.onoma_ma8hmatos from ma8hmata,va8mologies where ma8hmata.am_ma8hmatos=va8mologies.am_ma8hmatos and va8mologies.am_ma8hmatos NOT IN (SELECT am_ma8hmatos FROM va8mologies WHERE am_foithth='"+am+"'); SELECT foithths.onoma,ma8hmata.am_ma8hmatos,foithths.epwnymo,foithths.am, ma8hmata.onoma_ma8hmatos FROM foithths,va8mologies,ka8hghths,ma8hmata WHERE va8mologies.am_foithth=foithths.am AND ka8hghths.am=ma8hmata.am_ka8hghth AND va8mologies.am_ma8hmatos=ma8hmata.am_ma8hmatos AND ka8hghths.am='"+am+"'; SELECT onoma,epwnymo,onoma_ma8hmatos,vathmologia from foithths,users,ma8hmata,va8mologies where foithths.onoma_xrhsth=users.onoma_xrhsth and va8mologies.am_ma8hmatos=ma8hmata.am_ma8hmatos and va8mologies.am_foithth=foithths.am and users.onoma_xrhsth='"+onoma+"'; SELECT onoma,epwnymo,onoma_ma8hmatos,synolikhva8mologia,hmeromhniaeksetashs, xronosepilyshstest,mesosorosswstwnapanthsewn,synololathosapanthsewn, synoloswstwnapanthsewn from foithths,users,statistika,ma8hmata where foithths.onoma_xrhsth=users.onoma_xrhsth and foithths.am=statistika.am and statistika.idma8hmatos=ma8hmata.am_ma8hmatos and users.onoma_xrhsth='"+onoma+"'; Page 1

sql queries univercitymanagment.txt CREATE TABLE Eksetash_"+surname+"_"+name+" ( idfoithth INTEGER, iderwthshs INTEGER NOT NULL, idkathgorias INTEGER, idapanthshsfoithth INTEGER, hmeromhnia VARCHAR(30), xiliostaekkinhshs BIGINT, xiliostatermatismou BIGINT, PRIMARY KEY(iderwthshs), FOREIGN KEY (idfoithth) REFERENCES foithths(am) on update cascade on delete cascade, FOREIGN KEY (iderwthshs) REFERENCES erwthseis(iderwthshs) on update cascade on delete cascade, FOREIGN KEY (idkathgorias) REFERENCES kathgorieserwthsewn(idkathgorias) on update cascade on delete cascade) character set greek collate greek_general_ci engine=InnoDB; SELECT COUNT(*) FROM erwthseis,apanthseis,Eksetash_"+surname+"_"+name+" where erwthseis.iderwthshs=Eksetash_"+surname+"_"+name+".iderwthshs and apanthseis.idapanthshs=Eksetash_"+surname+"_"+name+".idapanthshsfoithth and Eksetash_"+surname+"_"+name+".idapanthshsfoithth not in( select idapanthshs from swstesapanthseis);

Page 2

You might also like