MySQL数据库错误:您的SQL语法有错误

MySQL数据库错误:您的SQL语法有错误,mysql,stored-procedures,Mysql,Stored Procedures,我使用的存储过程出现上述错误。下面是存储过程 MySQL Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as billing_services from billing_services_t where service_id=x ; se

我使用的存储过程出现上述错误。下面是存储过程

MySQL Database Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'as billing_services from billing_services_t where service_id=x ;    select * fr' at line 3

当我被包含在计费服务中时,我遇到了错误。此查询是否有任何错误。

您不能将别名指定给*您应该在表名之后指定别名

CREATE PROCEDURE pn_crm_psp_billing_pnsl.`Takeoffone6`(x INT)
  BEGIN
   select * as billing_services from billing_services_t where service_id=x ;
  select * from billing_product_type_t
   ;
 END;

“选择*作为计费服务”。这是语法错误。。您可以为特定列或表指定别名。。。但在这里,您试图同时为所有列分配别名…谢谢@RakeshShewale
select *  from billing_services_t as billing_services where billing_services.service_id=x ;