Beginning SQL Tutorial
Beginning SQL Tutorial
Do exercises 2, 4, and 6.
The tables you need are in your handout packet
Creating Tables
The statement to use is create table
Here is the syntax:
update “tablename”
set “columnname” = “newvalue”,
“nextcolumn” = “newvalue2”, ...
where “columnname” OPERATOR
“value” and|or “columnname2 OPERATOR “value”
Updating Records cont’d
Here are some practical examples:
ex)
update phone_book
set area_code = 623
where prefix = 979;
This changes the area code all numbers
beginning with 979 to 623
Updating Records cont’d
update phone_book
set last_name = 'Smith', prefix=555, sufix=9292
where last_name = 'Jones';