Viewing 15 posts - 76 through 90 (of 454 total)
The correct answer is "it depends."
MOST of the time you'll get two rows as explained in the answer.
HOWEVER, each GETDATE() within each SELECT is evaluated separately. When the separate evaluations...
August 25, 2016 at 9:08 pm
roger.plowman (8/23/2016)
sknox (8/23/2016)
roger.plowman (8/23/2016)
August 23, 2016 at 8:45 am
roger.plowman (8/23/2016)
August 23, 2016 at 7:35 am
TomThomson (8/18/2016)
...(NULL) certainly sorts as if it were equal to itself and less everything else.
That is because it's in the standard:
SQL-92 section 20.2 <direct select statement: multiple rows> General Rule...
August 19, 2016 at 2:43 pm
Mike Hays (8/19/2016)
Good Question, did not know that this command existed...
It's new in 2014SP2 -- and not in 2016 (yet).
August 19, 2016 at 6:04 am
Ed Wagner (8/15/2016)
August 15, 2016 at 8:00 pm
Sergiy (8/14/2016)
1. The same small query populating a temp table may be reused in several procedures.
In such case its plan will...
August 14, 2016 at 9:07 pm
Stan Kulp-439977 (8/12/2016)
August 12, 2016 at 9:47 am
TomThomson (8/4/2016)
Steve Jones - SSC Editor (8/4/2016)
TomThomson (8/4/2016)
I think the question should have specified SQL Server 2014 SP2 and noted that it applies in no other release.
You...
August 4, 2016 at 12:52 pm
david.gugg (7/25/2016)
July 25, 2016 at 12:32 pm
Jeff Moden (7/20/2016)
July 21, 2016 at 7:05 am
jon_tout (7/7/2016)
So all 4 would rank as being 'VERY Strong!'2 would rank as 'meh, well OK then'
1 would rank as 'you gotta be kidding'
🙂
And 0 would rank...
July 7, 2016 at 6:29 am
SQL-DBA-01 (7/3/2016)
Why not option 2?
In parameter declaration, @parameter type = defaultvalue, the part after the equals sign is a default, not an assigned, value.
In T-SQL, parameter default values must be...
July 4, 2016 at 9:23 am
Carlo Romagnano (6/30/2016)
SELECT @p = N'@m varchar(200)="event message", @d datetime=getdate(), @U varchar(10)="Steve" '
I.e. this code returns 1 despite @p...
June 30, 2016 at 6:12 am
prathmanu (6/28/2016)
June 29, 2016 at 9:20 pm
Viewing 15 posts - 76 through 90 (of 454 total)