Recent PostsRecent Posts Popular TopicsPopular Topics
 Home Search Members Calendar Who's On

 What's the count? Rate Topic Display Mode Topic Options
Author
 Message
 Posted Wednesday, March 10, 2010 9:18 PM
 SSC-Addicted Group: General Forum Members Last Login: Monday, October 31, 2011 1:10 PM Points: 480, Visits: 1,163
 Comments posted to this topic are about the item What's the count? --
Post #880671
 Posted Wednesday, March 10, 2010 11:02 PM
 SSC-Insane Group: General Forum Members Last Login: Yesterday @ 8:49 PM Points: 20,462, Visits: 14,092
 Thanks for the question. Nice job. Jason AKA CirqueDeSQLeilI have given a name to my pain...MCM SQL ServerSQL RNNRPosting Performance Based Questions - Gail ShawPosting Data Etiquette - Jeff ModenHidden RBAR - Jeff ModenVLFs and the Tran Log - Kimberly Tripp
Post #880708
 Posted Wednesday, March 10, 2010 11:19 PM
 SSCrazy Group: General Forum Members Last Login: Thursday, March 13, 2014 4:10 AM Points: 2,296, Visits: 1,424
 Nice Question ....Today i learned this from Central...Good Question
Post #880717
 Posted Thursday, March 11, 2010 12:13 AM
 Old Hand Group: General Forum Members Last Login: Wednesday, December 11, 2013 7:12 AM Points: 366, Visits: 455
 Good question..never thought of using count(*) for 2 tables in one T-SQL...thanks for question
Post #880751
 Posted Thursday, March 11, 2010 12:50 AM
 Forum Newbie Group: General Forum Members Last Login: Tuesday, March 15, 2011 10:49 PM Points: 5, Visits: 10
 count is basically. Counting the each record of that table. For Example. Table A has 3 rows then count = 3. if table B has 4 Rows then count=4. If combine both tables then 3 * 4 = 12 rows and count = 12
Post #880768
 Posted Thursday, March 11, 2010 1:05 AM
 SSCrazy Group: General Forum Members Last Login: 2 days ago @ 6:53 AM Points: 2,393, Visits: 2,286
 if one table has one o more rows and the other is void, the result is 0.NumberOfRows * 0 = 0
Post #880775
 Posted Thursday, March 11, 2010 2:03 AM
 SSCrazy Group: General Forum Members Last Login: Tuesday, January 21, 2014 7:57 AM Points: 2,173, Visits: 344
 In Point of Interview Very Intelligence Question ......Nice...hmmmmm My Answer is Correct............!
Post #880809
 Posted Thursday, March 11, 2010 2:31 AM
 SSCommitted Group: General Forum Members Last Login: Saturday, April 12, 2014 4:20 AM Points: 1,637, Visits: 422
 That's is a good question, illustrating the need for careful joins!For those that don't know, this kind of result is called a "cartesian product", and if you allow it to happen in a real-world application with even a few hundred rows in either table, you are in for something of an explosion of complaints from your users, to say the least.Ken.
Post #880821
 Posted Thursday, March 11, 2010 3:43 AM
 Ten Centuries Group: General Forum Members Last Login: Wednesday, April 16, 2014 7:47 AM Points: 1,174, Visits: 2,635
 Very good question.However I think that the explanation is a bit lacking, and could explain in more detail what is happening here and what a 'cross join'/'cartesian product' is.Here are some links that may help:Cross JoinCartesian Product
Post #880860
 Posted Thursday, March 11, 2010 8:08 AM
 SSCrazy Group: General Forum Members Last Login: Monday, April 14, 2014 2:16 PM Points: 2,812, Visits: 2,543
 This one definitely made me think a minute or two.
Post #881038

 Permissions