C#上机练习4

--上机4

SELECT * FROM Student WHERE  DATEDIFF(d,BornDate,GETDATE())>=365*20 
SELECT * FROM Student  WHERE DATENAME(mm,BornDate)=1
SELECT * FROM Student  WHERE  DATEPART(mm,GETDATE())= DATEPART(mm,BornDate) AND DATEPART(dd,GETDATE())= DATEPART(dd,BornDate)
SELECT RIGHT(Email,LEN(Email)-CHARINDEX('@',Email,1)) FROM Student  WHERE StudentNo='Y21003007'
SELECT 's1'+ CONVERT(VARCHAR(4),DATEPART(YYYY,GETDATE()))+RIGHT(RAND(),4)+'@jbit.com'

你可能感兴趣的:(C#上机练习4)