Please start any new threads on our new 
    site at https://forums.sqlteam.com.  We've got lots of great SQL Server
    experts to answer whatever question you can come up with.
    
        
            
                
                    
                        
                            
                                | Author | 
                                
                                 Topic  | 
                             
                            
                                    | 
                                         abhijaiswal.84 
                                        Starting Member 
                                         
                                        
                                        29 Posts  | 
                                        
                                        
                                            
                                            
                                             Posted - 2012-05-30 : 02:32:53
                                            
  | 
                                             
                                            
                                            | Hi,Can anyone help me to findout the answer for,How will you get count of rows from table except count?THanks in advance.Abhishek | 
                                             
                                         
                                     | 
                             
       
                            
                       
                          
                            
                                    | 
                                     visakh16 
                                    Very Important crosS Applying yaK Herder 
                                     
                                    
                                    52326 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-05-30 : 16:35:37
                                          
  | 
                                         
                                        
                                          | what do you mean by count of rows from table except count ?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     nigelrivett 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    3385 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-05-31 : 00:38:04
                                          
  | 
                                         
                                        
                                          | Select count(*) from tblMight be a startOr sp_spaceused tblTry that and come back with anything else you want.==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy.  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     abhijaiswal.84 
                                    Starting Member 
                                     
                                    
                                    29 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-05-31 : 02:02:35
                                          
  | 
                                         
                                        
                                          | I want the count of the records in a table (e.g. Select count (*) from TableName) but I dont want to use count keyword.Without using "count" keywork how can we get the count of records from a table?Abhishek  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     nigelrivett 
                                    Master Smack Fu Yak Hacker 
                                     
                                    
                                    3385 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-05-31 : 03:29:49
                                          
  | 
                                         
                                        
                                          | Why do you not want to use count? Anything else you don't want to use?sp_spaceused will do it.Can also use sysindexes or sys.partitions but that will require other keywords==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy.  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     SwePeso 
                                    Patron Saint of Lost Yaks 
                                     
                                    
                                    30421 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-05-31 : 04:31:21
                                          
  | 
                                         
                                        
                                          BEGIN TRANDELETE FROM dbo.TableSELECT @@ROWCOUNTROLLBACK TRAN N 56°04'39.26"E 12°55'05.63"  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     abhijaiswal.84 
                                    Starting Member 
                                     
                                    
                                    29 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-05-31 : 05:44:23
                                          
  | 
                                         
                                        
                                          | I want to solve this query with some other ways, if we use any other keyword other than "Count" will also fine.Abhishek  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     visakh16 
                                    Very Important crosS Applying yaK Herder 
                                     
                                    
                                    52326 Posts  | 
                                    
                                      
                                        
                                          
                                           
                                            Posted - 2012-05-31 : 16:15:01
                                          
  | 
                                         
                                        
                                          quote: Originally posted by abhijaiswal.84 I want to solve this query with some other ways, if we use any other keyword other than "Count" will also fine.Abhishek
  looks like an interview question to meother than that i cant see a reason for this requirementSELECT SUM(1)FROM table ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/  | 
                                         
                                        
                                            | 
                                         
                                       
                                     | 
                                   
                            
                       
                          
                            
                                    | 
                                     madhivanan 
                                    Premature Yak Congratulator 
                                     
                                    
                                    22864 Posts  | 
                                    
                                      
                                     | 
                                   
                            
                            
                                | 
                                    
                                      
                                     
                                    
                                 | 
                             
                         
                     | 
                 
             
         |