代码如下:

select * from dbo.HRReOrPuType


/* with 的写法避免了产生临时表的IO,更多建议请参考:http://wudataoge.blog.163.com/blog/static/80073886200961652022389/ */
with t_rePuType1 as
(
	select Id from HRReOrPuType where typeName like '出勤奖%'
)/* 后面可以接N个,但with结束后,必须使用with定义的这些变量 ,
t_rePuType2 as 
(

) */
select * from dbo.HRUserReAndPu where hRReOrPuTypeId in (select * from t_rePuType1)

谢谢您的浏览!

相关文章:

  • 2021-12-21
  • 2022-12-23
  • 2021-08-02
  • 2021-07-11
  • 2022-12-23
  • 2021-11-21
  • 2022-12-23
  • 2021-09-07
猜你喜欢
  • 2021-10-17
  • 2022-01-06
  • 2022-01-17
  • 2021-12-16
  • 2021-08-12
  • 2022-12-23
  • 2021-06-05
相关资源
相似解决方案