7.test

来自「嵌入式Linux应用开发详解的所有相应源码」· TEST 代码 · 共 43 行

TEST
43
字号
# OK : Simple joinselect staff.first_name, staff.last_name, users.uname from staff, users 	where staff.staff_id = users.staff_id \p\g# OK : Simple join with aliasesselect S.first_name, S.last_name, U.uname 	from staff=S, users=U	where S.staff_id = U.staff_id \p\g# OK : 3 way select staff.first_name, staff.last_name, users.uname, contact.phone	from staff, users, contact	where staff.staff_id = users.staff_id 		and users.staff_id = contact.staff_id\p\g# OK : 3 way with table aliasesselect S.first_name, S.last_name, U.uname, C.phone	from staff = S, users = U, contact = C	where S.staff_id = U.staff_id and U.staff_id = C.staff_id\p\g# OK : Join with sysvar being carried through the result tableselect S._rowid, S.first_name, S.last_name, U.uname, C.phone	from staff = S, users = U, contact = C	where S.staff_id = U.staff_id and U.staff_id = C.staff_id\p\g# OK : do some ordering as wellselect S.first_name, S.last_name, U.uname, P.pay_date, P.pay_amount	from staff = S, users = U, pay = P	where S.staff_id = U.staff_id and U.staff_id = P.staff_id	order by S.last_name\p\g# OK : ordering and distinctselect distinct S.first_name, S.last_name, U.uname, P.pay_amount	from staff = S, users = U, pay = P	where S.staff_id = U.staff_id and U.staff_id = P.staff_id	order by S.last_name\p\g

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?