**
Hello i am newbiw to MYSQL .... iwant to create stored procedure in PHPMYADMIN . But when i am same procedue od MS SQL in MYSQL it is giving error .

1064 - 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 '@'companyna' nvarchar(150)

begin
select Company_Name from companynames
where ' at line 2

this is my MS SQL Stored Procedure
create proc spgetcompanynames
@companyna nvarchar(150)
as
begin
select Company_Name from companynames
where Company_Name Like @companyna + '%'
end

this is my MYSQL Stored Procedure
create procedure spGetCompanyNames
@CompanyNams varchar(250)
begin
select Company_Name from companynames
where Company_Name Like @CompanyNams + '%'
end


Plz Help

**

Re: problem in creating stored procedure 80 80

Hi there.
MySQL syntax is some what different from MSSQL syntax. For instance, MySQL Parameters don't start with '@'.

Thake a look at those pages, it will help you out.

http://www.mysqltutorial.org/mysql-stored-procedure-tutorial.aspx

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.19 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.