CMPUT 291 2022_09_23
2022年9月23日
CMPUT 291 2022_09_023
sql 1/3
这是一个PDF QL-SQL1
sql 基本语法
CREATE TABLE branch (
bname CHAR(20),
adress CHAR(30)
city CHAR(15),
asset INT,
);
quer two relations
customer(cname, street, city) deposit(accno, cname, bname, balance)
- List the name and the city of every customer who has an account with balance over $2,000.
SELECT customer.cname, city
FROM customer, deposit
WHERE balance > 2000
AND customer.cname = deposit.cname