Are you trying to use this on the default Custom Table Data screen in the admin UI? OR trying to use a data control of some on a page?
If it's the first, adding a selectall query won't anything. In that case you would have to do some magic behind the scenes to that admin control, but I would really not recommend that. Instead iould hide that from their interface and put a data control in the pages structure or used your own admin module.