select * from customers where
salesRepEmployeeNumber=(
select employeeNumber from employees
where jobtitle="sales rep"
limit 1) ;
结果集:
计算行数:
select count(*) from(
select * from customers where
salesRepEmployeeNumber=(
select employeeNumber from employees
where jobtitle="sales rep"
limit 1) ) mytable ;
结果集: