1.声明一个长度为6的字符变量 i ,并赋值”101001”,显示变量 i ;
declare @i as char(6)
set @i='101001'
select @i as '字符变量'
2.显示当前的系统时间和一年后的今天的具体时间;
declare @currentdatetime datetime
set @currentdatetime=getdate()
select @currentdatetime as '当前系统时间'
1.声明一个长度为6的字符变量 i ,并赋值”101001”,显示变量 i ;
declare @i as char(6)
set @i='101001'
select @i as '字符变量'
2.显示当前的系统时间和一年后的今天的具体时间;
declare @currentdatetime datetime
set @currentdatetime=getdate()
select @currentdatetime as '当前系统时间'