1. 求結(jié)果:select "1"?
報錯,SQL里面只有單引號,列如:'xx'
2. 查找包含"objs"的表?查找包含"o"的數(shù)據(jù)庫?
select * from sys.objects where name like '%objs%'
select * from sys.databases where name like '%o%'
3. 求今天距離2002年有多少年,多少天?
select datediff(yy,'2002',getdate())
select datediff