获取一个结果集的行数:count(*)和派生表的使用

it2025-01-12  5

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 ;

结果集:

最新回复(0)