Are there programs documents that allow you to bring SQL Query in a normal form?

Select * from table as A where A.field in ("A", "B", "C") =>

SELECT * FROM table where table.field = "A" OR table.field = "B" OR table.field = "C"

Or any kind that is considered normal in the framework of Tula

  • one
  • four
    And what do you mean by "normal view" (and even in the city of Tula?). I know the concept of normalization in the framework of bringing the database structure to the 5th normal form. And both types of query are absolutely equivalent and are described in the SQL92 standard, so I don’t see any reason to consider one of them “not normal” - Mike
  • one
    And I strongly doubt that such a thing exists, because it is completely unnecessary and even harmful. from rewriting the request can change the execution plan and, accordingly, speed. And only a programmer can make an informed decision why he writes a query exactly as he writes - Mike
  • 3
    @IvanGladush tool has no right to change 10, 11, 12 on between because in the database there may be a value of 10.4, for example, i.e. fractional. In addition, in certain versions of mysql there were optimizer problems specifically on between, the query was executed much longer - Mike
  • 3
    I already understood it. I even saw something similar in the query editor in the DataWindow PowerBuilder. it tried to bring the request into a graphical form and when returning back made it "normal", which made it impossible to use it and everyone knew that this button should not be pressed, nor when. In addition, there must be translators of dialects, they should also do something similar - Mike

0