COMP 189 Lecture Notes - Lecture 10: Foreign Key, Semicolon

35 views2 pages

Document Summary

Refer to class notes from oct. 27th posted. Every command has to end with a semicolon. Capital is a foreign key into the city table. The (cid:373)ost po(cid:449)erful (cid:272)o(cid:373)(cid:373)a(cid:374)d for pulli(cid:374)g i(cid:374)fo out of a data(cid:271)ase is (cid:862)sele(cid:272)t" Select identifies a bunch of records and will print out the ones that satisfy our query. We need to print out the name and population fields of the country table. Elect (cid:272)ode, (cid:374)a(cid:373)e, populatio(cid:374) from (cid:272)ou(cid:374)try where (cid:272)o(cid:374)ti(cid:374)e(cid:374)t = (cid:862)afri(cid:272)a(cid:863); Select code, name, population from country where co(cid:374)ti(cid:374)e(cid:374)t = (cid:862)(cid:374)orth a(cid:373)eri(cid:272)a(cid:863) limit (cid:1005)(cid:1004); Select code, name, population from country where population > 1000000000; Elect (cid:272)ode, (cid:374)a(cid:373)e, populatio(cid:374), from (cid:272)ou(cid:374)try where (cid:272)o(cid:374)ti(cid:374)e(cid:374)t = (cid:862)north a(cid:373)eri(cid:272)a(cid:863) and populatio(cid:374) > Needs to be and, think sandwich or fries is satisfied by a sandwich, or fries. But sandwich and fries connects the two ideas together. Where a data(cid:271)ase really (cid:449)i(cid:374)s: these li(cid:374)es that (cid:449)e are (cid:449)riti(cid:374)g do(cid:374)"t (cid:272)ha(cid:374)ge (cid:449)he(cid:374) it"s a huge data(cid:271)ase.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents