Last active
December 13, 2019 10:09
-
-
Save b2977053/60b0996785d1dc775052ce37e323b2fe to your computer and use it in GitHub Desktop.
This file contains hidden or 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
PRINT REPLICATE('A--', 3) -- A--A--A-- | |
-- 補零 | |
DECLARE @C1 varchar(4) = '12'; | |
PRINT DATALENGTH(@C1) -- 2 | |
PRINT REPLICATE('0', 4 - DATALENGTH(@C1)) + @C1 -- 0012 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment