0% found this document useful (0 votes)
1 views11 pages

Studenti-1

The document contains SQL commands for creating a database named 'Studenti' with multiple tables including 'Facultate', 'Materie', 'Profesor', 'Licenta', 'Student', and others. Each table is defined with specific fields, data types, and constraints, such as primary keys and foreign keys to establish relationships between tables. Additionally, there are insert statements to populate the tables with sample data related to faculties, subjects, professors, and students.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views11 pages

Studenti-1

The document contains SQL commands for creating a database named 'Studenti' with multiple tables including 'Facultate', 'Materie', 'Profesor', 'Licenta', 'Student', and others. Each table is defined with specific fields, data types, and constraints, such as primary keys and foreign keys to establish relationships between tables. Additionally, there are insert statements to populate the tables with sample data related to faculties, subjects, professors, and students.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 11

/*Creare tabele */

--drop database Studenti;


--create database Studenti;
use Studenti;

create table Facultate(


ID int Primary Key Identity (1,1),
Denumire nvarchar(50) not null,
Adresa nvarchar(50) not null,
Specializare nvarchar(50) not null,
NrAni int check (NrAni in (2,3,4,5,6,7))
)

create table Materie(


ID int Primary Key Identity (1,1),
IdFacultate int not null,
foreign key (IdFacultate) references Facultate(ID),
Denumire nvarchar(50) not null,
AnDeStudiu nvarchar(3) not null check (AnDeStudiu IN ('I', 'II', 'III', 'IV', 'V',
'VI', 'VII')),
Semestru nvarchar(2) not null check(Semestru IN ('I', 'II')),
Credite int not null check (Credite in (4,5,6)) default 6,
Examen bit,
Colocviu bit,
check (Examen=1 or Colocviu=1))

create table Profesor(


ID int Primary Key Identity (1,1),
IdFacultate int not null,
foreign key (IdFacultate) references Facultate(ID),
Nume nvarchar(20) not null,
Prenume nvarchar(20) not null,
Curs bit,
Laborator bit,
check (Curs=1 or Laborator=1))

create table MateriiProfesori(


ID int Primary Key Identity (1,1),
IdMaterie int not null,
foreign key (IdMaterie) references Materie(ID),
IdProfesor int not null,
foreign key (IdProfesor) references Profesor(ID))

create table Licenta(


ID int Primary Key Identity (1,1),
AnDeStudiu nvarchar(3) not null check (AnDeStudiu IN ('II', 'III', 'IV', 'V', 'VI',
'VII')),
NotaExamenScris numeric(5,2) not null,
NotaProiect numeric(5,2) not null,
IdMaterie int not null,
foreign key (IdMaterie) references Materie(ID),
MedieLicenta numeric(5,2))

create table Student(


ID int Primary Key Identity (1,1),
IdFacultate int not null,
foreign key (IdFacultate) references Facultate(ID),
Nume nvarchar(20) not null,
Prenume nvarchar(20) not null,
Email nvarchar(40) not null,
NrTelefon nvarchar(15),
DataNaterii date not null,
Varsta as (DATEDIFF(yy, DataNaterii, GETDATE())),
AnInmatriculare int not null check (AnInmatriculare >2010 and AnInmatriculare
<2022) default 2020,
Grupa nvarchar(5) not null,
CrediteTotale int default 0,
IdLicenta int,
foreign key (IdLicenta) references Licenta(ID),
MedieFinala numeric(5,2),
Buget bit not null default 1,
TaxaLaZi bit not null default 0,
Exmatriculat bit default 0)

create table StudentAnStudiu(


ID int Primary Key Identity (1,1),
NrAnStudiu nvarchar(3) not null check(NrAnStudiu IN ('I', 'II', 'III', 'IV', 'V',
'VI', 'VII')),
IdStudent int Not Null,
foreign key (IdStudent) references Student(ID),
MedieSemI numeric(5,2),
MedieSemII numeric(5,2),
MedieAn numeric(5,2),
NrCrediteObtinute int,
NrMaximCrediteAn int,
NrMinimCrediteAn int,
check (NrCrediteObtinute >= NrMaximCrediteAn AND NrMaximCrediteAn >=
NrMinimCrediteAn)
)

create table Catalog(


ID int Primary Key Identity (1,1),
IdStudent int Not Null,
foreign key (IdStudent) references Student(ID),
IdMaterie int not null,
foreign key (IdMaterie) references Materie(ID),
Nota int Not Null check (Nota>0 and Nota<11),
DataNotare date Not Null default GETDATE()
)

/*Insert in tabele*/

insert into Facultate values


('Factultatea de Stiinte', 'Str Alexandru Ioan Cuza nr 2', 'Informatica', 3),
('Factultatea de Stiinte', 'Str Alexandru Ioan Cuza nr 2', 'Matematica', 3),
('Factultatea de Stiinte', 'Str Alexandru Ioan Cuza nr 2', 'Fizica', 3),
('Factultatea de Stiinte', 'Str Alexandru Ioan Cuza nr 2', 'Chimie', 3),
('Factultatea de Litere', 'Str Alexandru Ioan Cuza nr 2', 'DPPD', 2)

insert into Materie values


(1,'Programare', 'I','I',6,1,0),
(1,'Programare Orientata Obiect', 'I','II',5,1,0),
(1,'Structuri de Date', 'I','I',6,0,1),
(1,'Tehnici de elaborare Algoritmi', 'I','II',6,0,1),
(1,'Sisteme de operare', 'I','II',6,1,0),
(1,'Algoritmi de calcul', 'I','I',5,1,0),
(1,'Inteligenta Artificala', 'I','II',4,1,0),
(1,'Engleza pentru Informatica', 'I','I',6,0,1),
(1,'Proiectarea Sistemelor de Operare', 'II','I',6,1,0),
(1,'Tehnologii Java', 'II','I',6,1,0),
(1,'Tehnologii Web', 'II','II',6,1,0),
(1,'Fundamentele Bazelor de Date', 'II','II',6,1,0),
(1,'Retele de Calculatoare', 'II','I',5,1,0),
(1,'Statistica Aplicata', 'II','II',6,1,0),
(1,'Securitatea Sistemelor Informatice', 'II','II',5,1,0),
(1,'Inginerie Software', 'III','II',5,1,0),
(1,'Algoritmi Paraleli si Distribuiti', 'III','II',6,1,0),
(1,'Calcul Numeric', 'III','II',6,1,0),
(1,'Limbaje Formale, Automate siCompilatoare', 'III','II',6,1,0),
(1,'Inginerie Software', 'III','II',6,1,0),
(1,'SGBD', 'III','I',6,1,0),
(1,'Algebra pentru Informatica', 'III','I',5,1,0),
(1,'Limbaje de Programare', 'III','I',5,1,0),
(1,'Sisteme Informatice Complze', 'III','I',5,1,0)

insert into Profesor values


(1,'Badea', 'Daniela',1,0),
(1,'Badescu', 'Anca',1,0),
(1,'Bratu', 'Veronica',1,0),
(1,'Bujor', 'Elena',1,0),
(1,'Chelaru', 'Ion',1,0),
(1,'Corban', 'Vicentiu',1,0),
(1,'Cozma', 'Hermus',1,0),
(1,'Danciu', 'Gabriel',0,1),
(1,'Goju', 'Razvan',0,1),
(1,'Fulga', 'Eleonor',0,1),
(1,'Herlea', 'Marius',1,1),
(1,'Lungu', 'Maria',1,1),
(1,'Ionita', 'Ileana',1,1),
(1,'Moga', 'Cosinzeana',1,1)

insert into MateriiProfesori values


(1,1),
(2,2),
(3,3),
(4,4),
(5,5),
(6,6),
(7,7),
(8,8),
(9,9),
(10,10),
(11,11),
(12,12),
(13,13),
(14,14),
(15,1),
(16,2),
(17,3),
(18,4),
(19,5),
(20,6),
(21,7),
(22,8),
(23,9),
(24,10),
(8,5),
(9,6),
(10,7),
(22,1),
(23,2),
(24,3)

insert into
Student(IdFacultate,Nume,Prenume,Email,NrTelefon,DataNaterii,AnInmatriculare,Grupa,
Buget,TaxaLaZi) values
(1,'Huidu','Anca','[email protected]','761611234','2000-01-01','2020',21,1,0),
(1,'Haiducu','Andrei','[email protected]','761611234','2001-1-
1',2020,21,1,0),
(1,'Misu','Alice','[email protected]','761611235','2001-2-2',2020,22,1,0),
(1,'Moldovean','Camelia','[email protected]','761611236','2001-3-
3',2020,23,1,0),
(1,'Morar','Celia','[email protected]','761611237','2001-4-4',2020,24,1,0),
(1,'Niculescu','Darius','[email protected]','761611238','2001-5-
5',2020,21,1,0),
(1,'Constantinescu','David','[email protected]','761611239','2001-6-
6',2020,22,1,0),
(1,'Ieremia','Doru','[email protected]','761611240','2001-7-7',2020,23,1,0),
(1,'Ispas','Eugen','[email protected]','761611241','2001-8-8',2020,24,1,0),
(1,'Istrate','Augustin','[email protected]','761611242','2001-9-
9',2020,21,1,0),
(1,'Lascau','Emil','[email protected]','761611243','2001-10-10',2021,22,1,0),
(1,'Iordache','Calin','[email protected]','761611244','2001-11-
11',2021,23,1,0),
(1,'Mugureanu','Codin','[email protected]','761611245','2001-12-
12',2021,24,0,1),
(1,'Muscalu','Florentina','[email protected]','761611246','2001-1-
13',2021,21,1,0),
(1,'Nicolau','Gabriel','[email protected]','761611247','2001-2-
14',2021,22,1,0),
(1,'Nichita','George','[email protected]','761611248','2001-3-
15',2021,23,1,0),
(1,'Negoita','Horatiu','[email protected]','761611249','2001-4-
16',2021,24,1,0),
(1,'Paladi','Bernard','[email protected]','761611250','2001-5-
17',2021,21,1,0),
(1,'Parvu','Adrian','[email protected]','761611251','2001-6-18',2021,22,1,0),
(1,'Pacea','Luca','[email protected]','761611252','2001-7-19',2021,23,1,0),
(1,'Pascu','Marian','[email protected]','761611253','2001-8-20',2021,24,1,0),
(1,'Olar','Marius','[email protected]','761611254','2001-9-21',2021,21,1,0),
(1,'Oancea','Nicusor','[email protected]','761611255','2001-10-
22',2021,22,1,0),
(1,'Raducan','Octavian','[email protected]','761611256','2001-11-
23',2021,23,1,0),
(1,'Radoi','Romulus','[email protected]','761611257','2001-12-
24',2021,24,1,0),
(1,'Pescaru','Vera','[email protected]','761611258','2001-4-25',2021,21,0,1),
(1,'Puiu','Victoria','[email protected]','761611259','2001-5-26',2021,22,1,0),
(1,'Preda','Teodora','[email protected]','761611260','2001-1-1',2020,21,1,0),
(1,'Racovita','Sorina','[email protected]','761611261','2001-2-
2',2020,22,1,0),
(1,'Sirbu','Rita','[email protected]','761611262','2001-3-3',2020,23,1,0),
(1,'Savin','Ramona','[email protected]','761611263','2001-4-4',2020,24,1,0),
(1,'Scarlat','Raluca','[email protected]','761611264','2001-5-
5',2020,21,1,0),
(1,'Surdu','Roberta','[email protected]','761611265','2001-6-6',2020,22,1,0),
(1,'Tarus','Sanda','[email protected]','761611266','2001-7-7',2020,23,1,0),
(1,'Topescu','Otilia','[email protected]','761611267','2001-8-
8',2020,24,1,0),
(1,'Tudoran','Oana','[email protected]','761611268','2001-9-9',2020,21,1,0),
(1,'Ulmeanu','Ioana','[email protected]','761611269','2001-10-
10',2021,22,1,0),
(1,'Vilcu','Anca','[email protected]','761611270','2001-11-11',2021,23,0,1),
(1,'Videanu','Ana','[email protected]','761611271','2001-12-12',2021,24,1,0),
(1,'Tomita','Nadia','[email protected]','761611272','2001-1-13',2021,21,1,0),
(1,'Tudoran','Nadine','[email protected]','761611273','2001-2-
14',2021,22,1,0),
(1,'Timofte','Natalia','[email protected]','761611274','2001-3-
15',2021,23,1,0),
(1,'Voinea','Nina','[email protected]','761611275','2001-4-16',2021,24,1,0),
(1,'Vladu','Nora','[email protected]','761611276','2001-5-17',2021,21,1,0),
(1,'Voineasa','Margarita','[email protected]','761611277','2001-6-
18',2021,22,1,0),
(1,'Zaharescu','Alina','[email protected]','761611278','2001-7-
19',2021,23,0,1),
(1,'Zidaru','Liana','[email protected]','761611279','2001-8-20',2021,24,1,0),
(1,'Zamfir','Lidia','[email protected]','761611280','2001-9-21',2021,21,1,0)

insert into Catalog values


(1,1,8,'2021-2-1'),
(2,1,10,'2021-2-1'),
(3,1,8,'2021-2-1'),
(4,1,8,'2021-2-1'),
(5,1,10,'2021-2-1'),
(6,1,9,'2021-2-1'),
(7,1,10,'2021-2-1'),
(8,1,9,'2021-2-1'),
(9,1,10,'2021-2-1'),
(10,1,10,'2021-2-1'),
(28,1,8,'2021-2-1'),
(29,1,10,'2021-2-1'),
(30,1,8,'2021-2-1'),
(31,1,9,'2021-2-1'),
(32,1,10,'2021-2-1'),
(33,1,10,'2021-2-1'),
(34,1,9,'2021-2-1'),
(35,1,9,'2021-2-1'),
(36,1,9,'2021-2-1'),
(1,3,8,'2021-2-10'),
(2,3,8,'2021-2-10'),
(3,3,8,'2021-2-10'),
(4,3,9,'2021-2-10'),
(5,3,9,'2021-2-10'),
(6,3,8,'2021-2-10'),
(7,3,9,'2021-2-10'),
(8,3,10,'2021-2-10'),
(9,3,10,'2021-2-10'),
(10,3,10,'2021-2-10'),
(28,3,10,'2021-2-10'),
(29,3,8,'2021-2-10'),
(30,3,8,'2021-2-10'),
(31,3,9,'2021-2-10'),
(32,3,10,'2021-2-10'),
(33,3,9,'2021-2-10'),
(34,3,8,'2021-2-10'),
(35,3,8,'2021-2-10'),
(36,3,9,'2021-2-10'),
(1,6,8,'2021-2-15'),
(2,6,9,'2021-2-15'),
(3,6,10,'2021-2-15'),
(4,6,8,'2021-2-15'),
(5,6,8,'2021-2-15'),
(6,6,8,'2021-2-15'),
(7,6,10,'2021-2-15'),
(8,6,9,'2021-2-15'),
(9,6,10,'2021-2-15'),
(10,6,9,'2021-2-15'),
(28,6,10,'2021-2-15'),
(29,6,10,'2021-2-15'),
(30,6,8,'2021-2-15'),
(31,6,9,'2021-2-15'),
(32,6,10,'2021-2-15'),
(33,6,8,'2021-2-15'),
(34,6,8,'2021-2-15'),
(35,6,9,'2021-2-15'),
(36,6,8,'2021-2-15'),
(1,8,8,'2021-2-17'),
(2,8,10,'2021-2-17'),
(3,8,8,'2021-2-17'),
(4,8,10,'2021-2-17'),
(5,8,10,'2021-2-17'),
(6,8,8,'2021-2-17'),
(7,8,8,'2021-2-17'),
(8,8,8,'2021-2-17'),
(9,8,8,'2021-2-17'),
(10,8,9,'2021-2-17'),
(28,8,9,'2021-2-17'),
(29,8,9,'2021-2-17'),
(30,8,10,'2021-2-17'),
(31,8,9,'2021-2-17'),
(32,8,9,'2021-2-17'),
(33,8,10,'2021-2-17'),
(34,8,10,'2021-2-17'),
(35,8,10,'2021-2-17'),
(36,8,10,'2021-2-17'),
(1,2,9,'2021-6-1'),
(2,2,8,'2021-6-1'),
(3,2,8,'2021-6-1'),
(4,2,9,'2021-6-1'),
(5,2,9,'2021-6-1'),
(6,2,8,'2021-6-1'),
(7,2,9,'2021-6-1'),
(8,2,10,'2021-6-1'),
(9,2,10,'2021-6-1'),
(10,2,9,'2021-6-1'),
(28,2,10,'2021-6-1'),
(29,2,10,'2021-6-1'),
(30,2,8,'2021-6-1'),
(31,2,10,'2021-6-1'),
(32,2,9,'2021-6-1'),
(33,2,8,'2021-6-1'),
(34,2,8,'2021-6-1'),
(35,2,8,'2021-6-1'),
(36,2,10,'2021-6-1'),
(1,4,9,'2021-6-10'),
(2,4,9,'2021-6-10'),
(3,4,10,'2021-6-10'),
(4,4,8,'2021-6-10'),
(5,4,9,'2021-6-10'),
(6,4,9,'2021-6-10'),
(7,4,9,'2021-6-10'),
(8,4,8,'2021-6-10'),
(9,4,10,'2021-6-10'),
(10,4,8,'2021-6-10'),
(28,4,10,'2021-6-10'),
(29,4,9,'2021-6-10'),
(30,4,8,'2021-6-10'),
(31,4,9,'2021-6-10'),
(32,4,10,'2021-6-10'),
(33,4,10,'2021-6-10'),
(34,4,10,'2021-6-10'),
(35,4,8,'2021-6-10'),
(36,4,10,'2021-6-10'),
(1,5,8,'2021-6-15'),
(2,5,9,'2021-6-15'),
(3,5,9,'2021-6-15'),
(4,5,10,'2021-6-15'),
(5,5,10,'2021-6-15'),
(6,5,9,'2021-6-15'),
(7,5,10,'2021-6-15'),
(8,5,8,'2021-6-15'),
(9,5,9,'2021-6-15'),
(10,5,9,'2021-6-15'),
(28,5,10,'2021-6-15'),
(29,5,10,'2021-6-15'),
(30,5,8,'2021-6-15'),
(31,5,9,'2021-6-15'),
(32,5,10,'2021-6-15'),
(33,5,8,'2021-6-15'),
(34,5,10,'2021-6-15'),
(35,5,10,'2021-6-15'),
(36,5,9,'2021-6-15'),
(1,7,9,'2021-6-17'),
(2,7,9,'2021-6-17'),
(3,7,9,'2021-6-17'),
(4,7,9,'2021-6-17'),
(5,7,8,'2021-6-17'),
(6,7,10,'2021-6-17'),
(7,7,8,'2021-6-17'),
(8,7,8,'2021-6-17'),
(9,7,9,'2021-6-17'),
(10,7,10,'2021-6-17'),
(28,7,9,'2021-6-17'),
(29,7,8,'2021-6-17'),
(30,7,10,'2021-6-17'),
(31,7,9,'2021-6-17'),
(32,7,9,'2021-6-17'),
(33,7,8,'2021-6-17'),
(34,7,10,'2021-6-17'),
(35,7,10,'2021-6-17'),
(36,7,10,'2021-6-17'),
(1,9,8,'2022-2-3'),
(2,9,10,'2022-2-3'),
(3,9,8,'2022-2-3'),
(4,9,8,'2022-2-3'),
(5,9,10,'2022-2-3'),
(6,9,9,'2022-2-3'),
(7,9,8,'2022-2-3'),
(8,9,9,'2022-2-3'),
(9,9,8,'2022-2-3'),
(10,9,9,'2022-2-3'),
(28,9,8,'2022-2-3'),
(29,9,8,'2022-2-3'),
(30,9,9,'2022-2-3'),
(31,9,9,'2022-2-3'),
(32,9,8,'2022-2-3'),
(33,9,8,'2022-2-3'),
(34,9,10,'2022-2-3'),
(35,9,10,'2022-2-3'),
(36,9,9,'2022-2-3'),
(1,10,9,'2022-2-7'),
(2,10,9,'2022-2-7'),
(3,10,8,'2022-2-7'),
(4,10,10,'2022-2-7'),
(5,10,10,'2022-2-7'),
(6,10,9,'2022-2-7'),
(7,10,9,'2022-2-7'),
(8,10,9,'2022-2-7'),
(9,10,9,'2022-2-7'),
(10,10,10,'2022-2-7'),
(28,10,9,'2022-2-7'),
(29,10,9,'2022-2-7'),
(30,10,10,'2022-2-7'),
(31,10,9,'2022-2-7'),
(32,10,10,'2022-2-7'),
(33,10,10,'2022-2-7'),
(34,10,10,'2022-2-7'),
(35,10,9,'2022-2-7'),
(36,10,9,'2022-2-7'),
(1,13,9,'2022-2-11'),
(2,13,10,'2022-2-11'),
(3,13,4,'2022-2-11'),
(4,13,10,'2022-2-11'),
(5,13,8,'2022-2-11'),
(6,13,9,'2022-2-11'),
(7,13,8,'2022-2-11'),
(8,13,8,'2022-2-11'),
(9,13,10,'2022-2-11'),
(10,13,10,'2022-2-11'),
(28,13,8,'2022-2-11'),
(29,13,9,'2022-2-11'),
(30,13,9,'2022-2-11'),
(31,13,8,'2022-2-11'),
(32,13,9,'2022-2-11'),
(33,13,9,'2022-2-11'),
(34,13,10,'2022-2-11'),
(35,13,10,'2022-2-11'),
(36,13,8,'2022-2-11'),
(11,1,10,'2022-2-4'),
(12,1,8,'2022-2-4'),
(13,1,10,'2022-2-4'),
(14,1,10,'2022-2-4'),
(15,1,9,'2022-2-4'),
(16,1,10,'2022-2-4'),
(17,1,10,'2022-2-4'),
(18,1,10,'2022-2-4'),
(19,1,10,'2022-2-4'),
(20,1,10,'2022-2-4'),
(21,1,10,'2022-2-4'),
(22,1,9,'2022-2-4'),
(23,1,10,'2022-2-4'),
(24,1,9,'2022-2-4'),
(25,1,8,'2022-2-4'),
(26,1,9,'2022-2-4'),
(27,1,10,'2022-2-4'),
(37,1,10,'2022-2-4'),
(38,1,8,'2022-2-4'),
(39,1,10,'2022-2-4'),
(40,1,9,'2022-2-4'),
(41,1,10,'2022-2-4'),
(42,1,9,'2022-2-4'),
(43,1,10,'2022-2-4'),
(44,1,10,'2022-2-4'),
(45,1,9,'2022-2-4'),
(46,1,9,'2022-2-4'),
(47,1,8,'2022-2-4'),
(48,1,9,'2022-2-4'),
(11,3,9,'2022-2-8'),
(12,3,9,'2022-2-8'),
(13,3,9,'2022-2-8'),
(14,3,4,'2022-2-8'),
(15,3,9,'2022-2-8'),
(16,3,9,'2022-2-8'),
(17,3,10,'2022-2-8'),
(18,3,8,'2022-2-8'),
(19,3,9,'2022-2-8'),
(20,3,9,'2022-2-8'),
(21,3,10,'2022-2-8'),
(22,3,8,'2022-2-8'),
(23,3,9,'2022-2-8'),
(24,3,10,'2022-2-8'),
(25,3,10,'2022-2-8'),
(26,3,10,'2022-2-8'),
(27,3,9,'2022-2-8'),
(37,3,9,'2022-2-8'),
(38,3,10,'2022-2-8'),
(39,3,9,'2022-2-8'),
(40,3,8,'2022-2-8'),
(41,3,10,'2022-2-8'),
(42,3,8,'2022-2-8'),
(43,3,8,'2022-2-8'),
(44,3,9,'2022-2-8'),
(45,3,9,'2022-2-8'),
(46,3,9,'2022-2-8'),
(47,3,10,'2022-2-8'),
(48,3,10,'2022-2-8'),
(11,6,9,'2022-2-12'),
(12,6,9,'2022-2-12'),
(13,6,8,'2022-2-12'),
(14,6,8,'2022-2-12'),
(15,6,10,'2022-2-12'),
(16,6,8,'2022-2-12'),
(17,6,8,'2022-2-12'),
(18,6,8,'2022-2-12'),
(19,6,9,'2022-2-12'),
(20,6,8,'2022-2-12'),
(21,6,10,'2022-2-12'),
(22,6,8,'2022-2-12'),
(23,6,9,'2022-2-12'),
(24,6,9,'2022-2-12'),
(25,6,10,'2022-2-12'),
(26,6,8,'2022-2-12'),
(27,6,9,'2022-2-12'),
(37,6,9,'2022-2-12'),
(38,6,8,'2022-2-12'),
(39,6,10,'2022-2-12'),
(40,6,8,'2022-2-12'),
(41,6,10,'2022-2-12'),
(42,6,10,'2022-2-12'),
(43,6,4,'2022-2-12'),
(44,6,9,'2022-2-12'),
(45,6,9,'2022-2-12'),
(46,6,8,'2022-2-12'),
(47,6,8,'2022-2-12'),
(48,6,9,'2022-2-12'),
(11,8,8,'2022-2-17'),
(12,8,10,'2022-2-17'),
(13,8,10,'2022-2-17'),
(14,8,9,'2022-2-17'),
(15,8,9,'2022-2-17'),
(16,8,9,'2022-2-17'),
(17,8,9,'2022-2-17'),
(18,8,4,'2022-2-17'),
(19,8,9,'2022-2-17'),
(20,8,9,'2022-2-17'),
(21,8,10,'2022-2-17'),
(22,8,9,'2022-2-17'),
(23,8,8,'2022-2-17'),
(24,8,9,'2022-2-17'),
(25,8,9,'2022-2-17'),
(26,8,8,'2022-2-17'),
(27,8,10,'2022-2-17'),
(37,8,9,'2022-2-17'),
(38,8,10,'2022-2-17'),
(39,8,9,'2022-2-17'),
(40,8,10,'2022-2-17'),
(41,8,10,'2022-2-17'),
(42,8,8,'2022-2-17'),
(43,8,8,'2022-2-17'),
(44,8,10,'2022-2-17'),
(45,8,4,'2022-2-17'),
(46,8,10,'2022-2-17'),
(47,8,9,'2022-2-17'),
(48,8,9,'2022-2-17')
alter table Student add Sex char not null default 'M'
update Student set Sex = 'F' where ID in (select ID from Student where Prenume like
'%a')
update Student set Sex = 'M' where Prenume = 'Luca'
update Student set Sex = 'F' where Prenume in ('Alice', 'Nadine')

You might also like