随笔分类 - SQLServer
SQLServer语法与使用的技巧
摘要:exec sp_addlinkedserver 'test ', ' ','SQLOLEDB','58.214.34.132,9046' exec sp_addlinkedsrvlogin 'test','false',null,'sa','wxsy1234' select count(1) fro
阅读全文
摘要:拼字符串成为时间,和两个计算时间点的中间值 select convert(datetime,'2016-09-18 '+SUBSTRING(CONVERT(varchar(100),d_bdate, 24), 0, 9),21) from B2C_daima where d_no='B04' sel
阅读全文
摘要:select top 10 * from schedule_month where years=2016 and months=7 and managerid=45SELECT top 10 cast(years AS varchar) + '-' + RIGHT('0' + CAST(months
阅读全文
摘要:with cte as ( select id,parent_id from [dbo].[manager_Department] where id=42 union all select b.id,b.parent_id from cte a join [dbo].[manager_Departm
阅读全文