After using too many tools, write the "difficult and complicated problems" of SQL on the command line.
In general, it is convenient to write SQL and operate directly in a variety of software that connects to the database, but sometimes it is necessary to perform operations on the database server, such as when executing scripts. The problem encountered this time is that after SQL has been written, it will query normally in the tool, but as soon as it is written into the script, there is no output or error, which is puzzling.
Tools:
On the server:
It turns out that the server should add a semicolon to write SQL at the end, and the script is no exception.
Just add it. I cried foolishly by myself.