当前位置:Gxlcms > 数据库问题 > Common SQL

Common SQL

时间:2021-07-01 10:21:17 帮助过:32人阅读

select Row_Number() over( order by getdate() ) as SN,* from table

exec sp_helptext spRpt_R169_v2

SELECT  b.name  as  TableName,a.name  as  columnname  
From  syscolumns   a  INNER  JOIN    sysobjects  b    
ON  a.id=b.id      
AND  a.name like ‘plan%‘;

select [day]=day(order_entered_dt)
from dbo.SM_Comm_CompMapping
where month(order_entered_dt)=4 and year(order_entered_dt)=2015
group by day(order_entered_dt)
order by day(order_entered_dt)

datediff(dd, s.Order_Entered_dt, getdate())< 30

 

Common SQL

标签:ppi   common   help   map   group   comm   row   ble   ext   

人气教程排行