Wolphie Posted May 3, 2008 Share Posted May 3, 2008 I was curious, does "as Num" make the result an integer? (Because it's returned as a string otherwise)? SELECT COUNT(*) as Num FROM `tbl_name` If so is there a better way to do this? Quote Link to comment Share on other sites More sharing options...
mrdamien Posted May 3, 2008 Share Posted May 3, 2008 "as Num" just means the field name returned will be named "Num" instead of "COUNT(*)", it doesn't affect the data type. Its returned as an integer because of the COUNT() function. Quote Link to comment Share on other sites More sharing options...
BlueSkyIS Posted May 3, 2008 Share Posted May 3, 2008 yes, Num is an alias. it could be pretty much anything: Dum, Chair, 34tq34t4t3r, anything. Quote Link to comment Share on other sites More sharing options...
Wolphie Posted May 3, 2008 Author Share Posted May 3, 2008 Cheers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.