Last active
December 18, 2015 01:48
-
-
Save yushiro/5705967 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--根据表名,产生INSERT 语句的字段和Value | |
DECLARE @p1 VARCHAR(1024), @p2 VARCHAR(1024) | |
SET @p1 = '' | |
SET @p2 = '' | |
SELECT @p1 = @p1 + name +',', @p2 = @p2 + '@' + name + ',' FROM sys.columns WHERE [object_id] = object_id('tblMemberAddr') | |
SELECT @p1, @p2 | |
--SQL 日期格式化 | |
--url: http://www.cnblogs.com/fanadu/archive/2009/01/05/1368825.html | |
select replace(replace(replace(CONVERT(varchar, getdate(), 120 ),'-',''),' ',''),':','') + 'ABCDEF' | |
--显示20040912110608 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment