create function [dbo].[f_createOrderId]
()
returns varchar(200)
begin
return replace(replace(replace(replace(convert(varchar(200),getdate(),121),' ',''),'.',''),':',''),'-','')
end
()
returns varchar(200)
begin
return replace(replace(replace(replace(convert(varchar(200),getdate(),121),' ',''),'.',''),':',''),'-','')
end
select [dbo].[f_createOrderId]()
显示结果:20090701135721890
显示结果:20090701135721890