From: abhishek jain Date: September 24 2012 6:55am Subject: RE: How to block SELECT * FROM table; but not SELECT * FROMT table WHERE...; List-Archive: http://lists.mysql.com/mysql/228242 Message-Id: <506003f6.4a4b440a.15fe.4bb3@mx.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, Or if you are interested in limiting the number of rows add a limit = clause, so that entire resultset of entire table is not returned , I am not sure how will that be done , but i have seen some GUIs doing = that, would look for a solution from group. Thanks Abhishek=20 > -----Original Message----- > From: Martin Gainty [mailto:mgainty@stripped] > Sent: 24 September 2012 04:58 > To: fuller.artful@stripped; pownalltim@stripped > Cc: mysql@stripped > Subject: RE: How to block SELECT * FROM table; but not SELECT * FROMT > table WHERE...; >=20 >=20 > Possibly run your constructed query thru a regex expression e.g. > String mydata =3D "SELECT * from table WHERE a Pattern.compile("'WHERE'"); Matcher matcher =3D = pattern.matcher(mydata); > if (matcher.find()) { //WHERE clause found proceed normally } else > throw new Exception("WHERE clause not found"); Martin > ______________________________________________ > Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et de > confidentialit=E9 >=20 > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede > unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. > Diese Nachricht dient lediglich dem Austausch von Informationen und > entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten > Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den = Inhalt > uebernehmen. > Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous = n'=EAtes pas > le destinataire pr=E9vu, nous te demandons avec bont=E9 que pour = satisfaire > informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e ou = la > copie de ceci est interdite. Ce message sert =E0 l'information = seulement > et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant = donn=E9 > que les email peuvent facilement =EAtre sujets =E0 la manipulation, = nous ne > pouvons accepter aucune responsabilit=E9 pour le contenu fourni. >=20 >=20 > > Date: Sun, 23 Sep 2012 18:38:58 -0400 > > Subject: Re: How to block SELECT * FROM table; but not SELECT * = FROMT > > table WHERE...; > > From: fuller.artful@stripped > > To: pownalltim@stripped > > CC: mysql@stripped > > > > Tim, > > > > I think you misunderstood the question. Daniel wants to block Select > > queries that ask for all rwows, and permit only queries that ask for > > some rows, as restricted by the Where clause. > > > > Unfortunately, I don't think that can be done. But I'm not certain = of > > that; there might be a trick. > > > > Arthur > > www.artfulsoftware.com > > > > On Sun, Sep 23, 2012 at 3:50 PM, Tim Pownall > wrote: > > > > > select * from table where column=3Dvalue means it will return = only > > > rows that match. as long as you have proper indexing there should > not be any issues. > > > > > > On Sun, Sep 23, 2012 at 1:23 PM, Luis Daniel Lucio Quiroz < > > > luis.daniel.lucio@stripped> wrote: > > > > > > >=20