Questions about this topic? Sign up to ask in the talk tab.

Difference between revisions of "SQL injection/Target Environments/Compatibility/Other"

From NetSec
Jump to: navigation, search
(Created page with "All of the databases share the same comparison operators, basic '''SELECT''', '''WHERE''', '''GROUP''', and '''ORDER''' syntax. PostgreSQL and MySQL now also share the same '''LI...")
 
 
Line 1: Line 1:
 +
<noinclude>:<font size="-2">[[SQL injection]] > [[SQL injection/Target Environments|Target Environments]] > [[SQL injection/Target Environments/Compatibility|Compatibility]] > Other</font></noinclude>
 +
 
All of the databases share the same comparison operators, basic '''SELECT''', '''WHERE''', '''GROUP''', and '''ORDER''' syntax. PostgreSQL and MySQL now also share the same '''LIMIT syntax'''}}
 
All of the databases share the same comparison operators, basic '''SELECT''', '''WHERE''', '''GROUP''', and '''ORDER''' syntax. PostgreSQL and MySQL now also share the same '''LIMIT syntax'''}}
  

Latest revision as of 02:22, 19 July 2012

SQL injection > Target Environments > Compatibility > Other

All of the databases share the same comparison operators, basic SELECT, WHERE, GROUP, and ORDER syntax. PostgreSQL and MySQL now also share the same LIMIT syntax}}

LIMIT [COUNT] offset [ROW TO START at]

Microsoft SQL does not have a LIMIT clause. In stead, sub-queries with SELECT TOP and ORDER BY clauses are used as a workaround. This makes for a less readable query and a more frustrating attack.

SELECT top 1 $column FROM (SELECT top $OFFSET $column FROM $table [WHERE clause] [GROUP BY clause] ORDER BY $column DESC) sq [GROUP BY clause] ORDER BY $column ASC