This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(2)
不知道为什么首先需要这里的临时表。您可以通过一些有条件的聚合可以大大简化这一点。这将通过职位返回性别计数。
Not sure why you need the temp tables here in the first place. You could simplify this considerably with some conditional aggregation. This will return the count of gender by job title.
go
信号在sql Server中批量的末端,因此您不能在批处理中间使用GO
功能等)参考
GO
signals the end of a batch in SQL Server so you can't usego
in middle of a batch (aprocedure
,function
etc.)Reference SQL Server docs