title: Parsing SQL code in C#
body: <p>I want to parse SQL code using C#.</p>
  
  <p>Specifically, is there any freely available parser which can parse SQL code and generate a tree or any other structure out of it? It should also generate the proper tree for nested structures.</p>
  
  <p>It should also return which kind of statement the node of this tree represents.</p>
  
  <p>For example, if the node contains a loop condition then it should return that this is a "loop type" of a node.</p>
  
  <p>Or is there any way by which I can parse the code in C# and generate a tree of the type I want?</p>