  SQL injection attacks, a class of injection flaw in which specially crafted
input strings leads to illegal queries to databases, are one of the topmost
threats to web applications. A Number of research prototypes and commercial
products that maintain the queries structure in web applications have been
developed. But these techniques either fail to address the full scope of the
problem or have limitations. Based on our observation that the injected string
in a SQL injection attack is interpreted differently on different
databases.Injection attack is a method that can inject any kind of malicious
string or anomaly string on the original string. Pattern matching is a
technique that can be used to identify or detect any anomaly packet from a
sequential action. Most of the pattern based techniques are used static
analysis and patterns are generated from the attacked statements. In this
paper, we proposed a detection and prevention technique for preventing SQL
Injection Attack using AhoCorasick pattern matching algorithm. In this paper,
we proposed an overview of the architecture. In the initial stage evaluation,
we consider some sample of standard attack patterns and it shows that the
proposed algorithm is works well against the SQL Injection Attack.
