if exists(select*from sys.databaseswhere name='model')print'存在'elseprint'不存在'
当前的系统时间年2位+月2位+日2位+时分秒,构成物品表编号;给物品表插入数据时,引用该函数。
- SQL code
-
select right(YEAR(getdate()),2)+ltrim(month(getdate()))+replace(convert(varchar,GETDATE(),108),':','') /*---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 1112111706 (1 行受影响)*/
select * from information_schema.routines_columns--其中created 创建存储过程的时间,--last_altered 最后一次修改存储过程的时间
转载于小F大神