What happens if you don't assign a length to varchar? I swear I'd learned that it became varchar(30).
Running on SQL Server 2014 SP3. Bold are the selects that are getting returned.
Running on SQL Server 2014 SP3. Bold are the selects that are getting returned.
DECLARE @blah VARCHAR
SET @blah = '123456'
SELECT @blah
DECLARE @date DATETIME=getdate()
SELECT CONVERT(VARCHAR, @date, 112)
SELECT @blah = CONVERT(VARCHAR, @date, 112)
SELECT @blah
1
2030302
2
No comments:
Post a Comment