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: 2 days ago @ 2:52 PM Points: 20,083, Visits: 18,257
 Thanks for the question. Nice job. Jason AKA CirqueDeSQLeilI have given a name to my pain...MCM SQL Server, MVPSQL RNNRPosting Performance Based Questions - Gail Shaw
Post #880708
 Posted Wednesday, March 10, 2010 11:19 PM
 SSCrazy Group: General Forum Members Last Login: Wednesday, October 26, 2016 1:29 PM Points: 2,523, Visits: 1,642
 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
 Hall of Fame Group: General Forum Members Last Login: 2 days ago @ 1:41 AM Points: 3,372, Visits: 3,192
 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: Friday, October 14, 2016 1:04 PM Points: 2,356, Visits: 401
 In Point of Interview Very Intelligence Question ......Nice...hmmmmm My Answer is Correct............!
Post #880809
 Posted Thursday, March 11, 2010 2:31 AM
 SSCrazy Group: General Forum Members Last Login: Thursday, December 8, 2016 2:31 AM Points: 2,320, Visits: 790
 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. You never know: reading my book: "All about your computer" might just tell you something you never knew!lulu.com/kaspencer
Post #880821
 Posted Thursday, March 11, 2010 3:43 AM
 Ten Centuries Group: General Forum Members Last Login: Thursday, September 29, 2016 7:09 AM Points: 1,276, Visits: 2,820
 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: Saturday, September 17, 2016 8:01 AM Points: 2,834, Visits: 2,629
 This one definitely made me think a minute or two.
Post #881038

 Permissions