Your SQL command was:
SELECT TOP 10 u,g,r,i,z,ra,dec, flags_r 
FROM Star 
WHERE 
 ra BETWEEN 180 and 181 AND dec BETWEEN -0.5 and 0.5
 AND ((flags_r & 0x10000000) != 0)
 AND ((flags_r & 0x8100000c00a4) = 0) 
 AND (((flags_r & 0x400000000000) = 0) or (psfmagerr_r <= 0.2))
 AND (((flags_r & 0x100000000000) = 0) or (flags_r & 0x1000) = 0)

Your query output (max 500,000 rows):

ugrizradecflags_r
23.8977225.4535222.942624.6152123.2422180.08236869403-0.4993153971192474503599929360400
22.857622.2076921.7220621.7267621.59424180.081550839138-0.4624333225006474503874773712896
22.7627421.6145321.3204121.0771221.16332180.102955001234-0.4299962425710254503874773712896
15.5668314.4365114.0534513.9166413.89215180.070715322722-0.4732683906462884503599962947656
23.8870122.9142321.4642820.382919.76734180.106055596863-0.4281204043148294503874773712896
24.2714624.1784522.9341322.8455222.51663180.102360174618-0.4622522083954674503874807398416
19.8077917.6238116.6312316.221115.95853180.333288545247-0.4960640982323944503599895838720
22.8695622.7195722.5951322.9719822.53589180.069475214975-0.4981082141203184503874907930624
25.4827322.9035721.2289719.9508219.23002180.08565943411-0.4386311918700514503874773745664
20.5609417.9117216.7708616.3493916.11848180.232750139903-0.4946337613883454503599895838720