You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/10/27 06:35:26 UTC

[GitHub] [shardingsphere] ulyChou commented on issue #13273: Failed to delete table data due to alias

ulyChou commented on issue #13273:
URL: https://github.com/apache/shardingsphere/issues/13273#issuecomment-952586019


   Hi @strongduanmu,I got the latest version and tried again.
   
   
   1.When I execute sql without an alias 👍 
   ```
   delete from oms_order_item where order_id = ?
    ```
   ```
   2021-10-27 14:32:37.828  INFO 361528 --- [nio-8500-exec-1] ShardingSphere-SQL                       : Logic SQL: delete from oms_order_item where order_id = ?
   2021-10-27 14:32:37.828  INFO 361528 --- [nio-8500-exec-1] ShardingSphere-SQL                       : SQLStatement: MySQLDeleteStatement(orderBy=Optional.empty, limit=Optional.empty)
   2021-10-27 14:32:37.828  INFO 361528 --- [nio-8500-exec-1] ShardingSphere-SQL                       : Actual SQL: ds ::: delete from oms_order_item_202110 where order_id = ? ::: [658646623312130048]
   ```
   
   
   2. when I execute sql with an alias
   ```
   delete t0 from oms_order_item t0 where t0.order_id  = ? 
   ```
   ```
   2021-10-27 14:29:02.075  INFO 361528 --- [nio-8500-exec-7] ShardingSphere-SQL                       : Logic SQL: delete t0 from oms_order_item t0 where t0.order_id  = ?
   2021-10-27 14:29:02.075  INFO 361528 --- [nio-8500-exec-7] ShardingSphere-SQL                       : SQLStatement: MySQLDeleteStatement(orderBy=Optional.empty, limit=Optional.empty)
   2021-10-27 14:29:02.075  INFO 361528 --- [nio-8500-exec-7] ShardingSphere-SQL                       : Actual SQL: ds ::: delete t0 from oms_order_item t0 where t0.order_id  = ? ::: [658646623312130048]
   
   javax.persistence.PersistenceException: Table 'erp_oms.oms_order_item' doesn't exist...
   ```
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org