日期:2014-05-18 浏览次数:20373 次
create function getid() returns char(12) as begin return convert(varchar,GETDATE(),12)+REPLACE(convert(varchar,GETDATE(),24),':','') end go select dbo.getid() /* ------------ 111226110801 (1 行受影响) */ go drop function dbo.getid