|
|
|
Old Hand
      
Group: General Forum Members
Last Login: Today @ 2:46 PM
Points: 372,
Visits: 419
|
|
I didn't see anything as to what question we were supposed to answer. Luckily I guessed correctly that we were supposed to select how many rows were returned by the query.
Tony ------------------------------------ Are you suggesting coconuts migrate?
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Thursday, June 13, 2013 8:50 PM
Points: 3,208,
Visits: 4,178
|
|
tabinsc (11/17/2011) I didn't see anything as to what question we were supposed to answer. Luckily I guessed correctly that we were supposed to select how many rows were returned by the query. The question is written in large letters, although with a typo ("may" instead of "many") 
How may rows will be returned by following query?
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Today @ 10:02 AM
Points: 1,383,
Visits: 4,870
|
|
A very easy question, unless you temporarily forget how to count
|
|
|
|
|
SSCrazy
      
Group: General Forum Members
Last Login: Today @ 8:36 AM
Points: 2,681,
Visits: 2,423
|
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, June 10, 2013 3:11 AM
Points: 264,
Visits: 179
|
|
sknox (11/17/2011) I've seen this crop up enough time on the forums to see why it rates 2 points. While the answer is super-easy if you know DATETIME, this question highlights one of the easiest mistakes for a beginner to make, and one that has serious real-world implications.
Hear! Hear!
|
|
|
|
|
Hall of Fame
       
Group: General Forum Members
Last Login: Today @ 5:32 PM
Points: 3,508,
Visits: 2,588
|
|
| THis was a really simple one - thanks!
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, June 06, 2013 4:06 PM
Points: 1,219,
Visits: 13,509
|
|
good question!!!
rfr.ferrari DBA - SQL Server 2008 MCITP | MCTS
remember is live or suffer twice!
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Thursday, January 31, 2013 8:53 AM
Points: 1,176,
Visits: 778
|
|
| nice easy question today - tks
|
|
|
|
|
Say Hey Kid
      
Group: General Forum Members
Last Login: Today @ 8:06 PM
Points: 664,
Visits: 1,337
|
|
There are good reasons to avoid using BETWEEN when comparing two datetimes. Particularly in the example the answer uses. You should be using the various symbols for GREATER THAN and LESS THAN.

One of the symptoms of an approaching nervous breakdown is the belief that one's work is terribly important. Bertrand Russell
|
|
|
|
|
SSC Veteran
      
Group: General Forum Members
Last Login: Monday, June 10, 2013 3:11 AM
Points: 264,
Visits: 179
|
|
GPO (11/17/2011) There are good reasons to avoid using BETWEEN when comparing two datetimes. Particularly in the example the answer uses. You should be using the various symbols for GREATER THAN and LESS THAN. No, I don't think you can (if not reverting to subqueries...)
The "AND" operator will check against the date-columns seperately - not simultaneously which in the case with "BETWEEN". Using GREATER THAN and LESS THAN in the above question would actually return all the records.
(Sorry, being a bit rusty I'm not entirely sure this is correct, but I've been there, done that and bought the friggin' t-shirt...)
|
|
|
|