troubleshooting Question

Sample mySQL routine/procedure similar to MS SQL stored procedure

Avatar of TSFLLC
TSFLLC asked on
MySQL ServerMicrosoft SQL Server
3 Comments1 Solution851 ViewsLast Modified:
Unfortunately new to mySQL...  been using MS SQL for # years.  Want to get my feet wet with mySQL.
Have created a database in mySQL and want to create similar 'procedures' as I would use in MS SQL.

I'm including a simple stored procedure I would create in MS SQL passing parameters from VB.NET for a SELECT.

Could someone show me what it would look like in mySQL?  I've been looking at 'passing parameters' examples.  Lost as to whether a MS SQL stored procedure is saved in mySQL as a routine or what?

Quick learner.  :-)
Thanks.
USE [A_DATABASE]
GO
/****** Object:  StoredProcedure [dbo].[SPS_SelectItems]    Script Date: 05/18/2011 21:21:35 ******/
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER PROCEDURE [dbo].[SPS_SelectItems]
@CompanyID bigint
AS
SELECT a.*
FROM purch_item a
WHERE a.company_id = @CompanyID
ORDER BY a.item_description

Open in new window

ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros