1
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

I am getting the above error with stored procedure,I am using.Below one is the stored procedure.

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;

I am getting the error when I am included the as billing_services .Is there anything wrong in this query.

2
  • "select * as billing_services". this is the syntax error.. you can assign an alias to specific column OR table... but here you are trying to assign alias to all columns at once... Commented Apr 28, 2017 at 6:31
  • Thank you @RakeshShewale Commented Apr 28, 2017 at 6:50

1 Answer 1

1

you can not give alias to * you should give it after table name

select *  from billing_services_t as billing_services where billing_services.service_id=x ;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.