TherChenYang commented on issue #29823: URL: https://github.com/apache/shardingsphere/issues/29823#issuecomment-1911492899
@strongduanmu Hello,I carefully looked at the definitions of 'select into' on various database platforms. ### Mysql - official document [SELECT ... INTO Statement](https://dev.mysql.com/doc/refman/8.0/en/select-into.html) - In Mysql the target of into is a variable or file,it is not a table <img width="890" alt="image" src="https://github.com/apache/shardingsphere/assets/124348939/0edeeaa9-d502-46ce-8300-cef0baa11a13"> ### Oracle - official document [RETURNING INTO Clause](https://docs.oracle.com/en/database/oracle/oracle-database/21/lnpls/RETURNING-INTO-clause.html#GUID-38F735B9-1100-45AF-AE71-18FB74A899BE) - In Oracle the target of into is record variable or scalar variable,also not table <img width="367" alt="image" src="https://github.com/apache/shardingsphere/assets/124348939/bb03b316-558d-42f4-8d5b-afe95181773a"> <img width="687" alt="image" src="https://github.com/apache/shardingsphere/assets/124348939/c3c93126-fea0-45e0-a4a8-6e6303abc658"> ### SQLServer - official document [SELECT (Transact-SQL)](https://learn.microsoft.com/zh-cn/sql/t-sql/queries/select-transact-sql?view=sql-server-ver16) - In SQLServer the target of into is table <img width="440" alt="image" src="https://github.com/apache/shardingsphere/assets/124348939/f68a506e-f6b6-4d95-bb8b-e0bd84da3aff"> ### PostgreSQL - official document [SELECT INTO](https://www.postgresql.org/docs/current/sql-selectinto.html) - In PostgreSQL the target of into is table <img width="740" alt="image" src="https://github.com/apache/shardingsphere/assets/124348939/a32d7521-3433-488d-b722-4c785775aef7"> So I think it is reasonable to believe that the original MySQL Vistor did not parse the "into" statement, because in MySQL, the object of "into" is a variable. I have parsed the "into" statement in the new PR #29860 for SQLServer,could you please check if this is feasible? I will also complete the part about PostgreSQL in the future. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
