CMPUT 291 2022_09_23

0x7FFFFFFF2022年9月23日
小于 1 分钟

CMPUT 291 2022_09_023

sql 1/3

pdf

这是一个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