微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

SQLSERVER newId()

SELECT ID,NewsType,Title,inputDate,hitcounter,sources
FROM cv_other.dbo.Hr_Newscontent


SELECT ID,sources FROM cv_other.dbo.Hr_Newscontent where 1=1  order by inputdate desc


SELECT NewTypeID,NewTypeName FROM cv_Other.dbo.Dic_HrNewsType
WHERE newTypeID LIKE '%'
ORDER BY NewTypeID ASC

 

select q.referenceId,q.questionName,q.questionType
from cv_other.dbo.Hr_Questionnaire q
where q.referenceId =
(
select max(q.referenceId) qid
from cv_other.dbo.Hr_Questionnaire q
where q.isValid = 1
)

 

select refId,loginType,userId,coins,giftCoins,ip,remark,updateDate
from gk.dbo.CoinsLog
where resId>0 and productId=3 and operFlag=1

select loginType,count(1) num
from gk.dbo.CoinsLog
where resId>0 and productId=3 and operFlag=1
group by loginType

 select loginType,count(1) num
 from gk.dbo.CoinsLog
 where resId>0 and productId=3 and operFlag=1 and updateDate>='2011-03-22 00:00:00.001' and updateDate<='2013-03-20 23:59:59.999'
 group by loginType


select * 
 from gk.dbo.CoinsLog
 where loginType=2 and resId>0 and productId=3 and operFlag=1 and updateDate>='2011-03-22 00:00:00.001' and updateDate<='2013-03-20 23:59:59.999'

 group by loginType

select referenceId,questionName,questionType,startTime,endTime,isValid from cv_other.dbo.Hr_Questionnaire

select questionId,answerContent,times from cv_other.dbo.Hr_QuestionAnswer

select top 100 * from cv_other.dbo.Hr_Newscontent order by newId()

select a.ID,a.NewsType,b.newTypeName,a.Title,a.Smallcontent,a.Content,a.Isfocus,a.inputDate,a.hitcounter,a.DelFlag,a.provider,a.address,a.DocFileName,a.BossFlag,a.bigIcon,a.minIcon,a.reads,a.supports
from  cv_other.dbo.hr_newsContent a
join cv_other.dbo.dic_hrnewstype b on(a.NewsType = b.newTypeId)
order by newId() 


select *
from gk..users


select *
from cv_other.dbo.dic_hrnewstype


select min(id),max(id) from cv_other.dbo.Hr_Newscontent

select newid()

INSERT INTO [cv_other].[dbo].[Hr_QuestionAnswer]
           ([questionID]
          ,[answerContent]
          ,[times])
     VALUES
           (<questionID,int,>
          ,<answerContent,varchar(200),<times,>)

INSERT INTO

 

update cv_other..Hr_Questionnaire set questionName=?,questionType=?,startTime=?,endTime=?,isValid=? where referenceId=?;
update cv_other..Hr_QuestionAnswer set answerContent=? where questionId=? and referenceId=?;
update cv_other..Hr_QuestionAnswer set answerContent=? where questionId=? and referenceId=?;
update cv_other..Hr_QuestionAnswer set answerContent=? where questionId=? and referenceId=?;
insert cv_other..Hr_QuestionAnswer(questionId,times) values (?,?,?);

[规范地方的,1,2013-03-22,2013-03-26,2,
3,4,
4个,5,
 88,6,
2,999,0]

 

 

INSERT INTO [cv_other].[dbo].[Hr_Questionnaire]            ([questionName]           ,[questionType]           ,[startTime]           ,[endTime]           ,[isValid])      VALUES            (<questionName,>           ,<questionType,tinyint,<startTime,smalldatetime,<endTime,<isValid,bit,>)

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐