-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathupdate_students.sql
More file actions
30 lines (22 loc) · 730 Bytes
/
update_students.sql
File metadata and controls
30 lines (22 loc) · 730 Bytes
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
29
30
/*
Student Full Names
Update remaining student records with these names
Analesse Bernard
Roy Brown
Rachel Black
Suzan White
Jazmine Edwards
*/
-- Update all enrollment dates that are empty (null)
-- Update specific records using a condition
update Students set enrollmentdate = '2019-05-01'
where enrollmentdate is null
-- Update all enrollment dates
-- Update multiple records (be careful)
update Students set enrollmentdate = '2019-06-10'
-- Update students with ids 7 & 11. Change first and last names
-- Update multiple columns
update Students set firstname = 'Tajee', lastname = 'McDermott'
where id = 7
update Students set firstname = 'Rhoddy', lastname = 'Shawn'
where id = 11