The invention particularly relates to a method for correcting nonstandard
SQL statements based on a large
language model. According to the method for correcting the irregular
SQL statement based on the large
language model, an
SQL table establishment statement, an Insert
insertion statement, a
natural language problem and a corresponding SQL
query statement are transmitted into a
system; executing the SQL table establishment statement, and if the line fails, entering a correction mode until the execution is successful; continuing to execute the Insert
insertion statement, and if the line fails, entering a correction mode until the execution is successful; and executing an SQL
query statement input by the user or generated by the large
language model, and if the line fails, entering an
error processing mode until execution succeeds. According to the method for correcting the irregular SQL statements based on the large language model, automatic correction and generation of the wrong SQL statements are achieved, operation of a user is simplified, the accuracy and efficiency of
data processing are improved, the difficulty of
database related operation under the business background is reduced, and the user experience is improved. And powerful support is provided for
data processing and analysis in a business scene.