On 8/2/05, Mark Leith <[EMAIL PROTECTED]> wrote: > > CREATE PROCEDURE title() > BEGIN > DECLARE title VARCHAR(255); > SET title = '%Unconditional%'; > SELECT title; > END; > // > > mysql> CALL title()// > +-----------------+ > | title | > +-----------------+ > | %Unconditional% | > +-----------------+ > 1 row in set (0.01 sec) > > HTH > > Mark > > Mark Leith > Cool-Tools UK Limited > http://www.cool-tools.co.uk > > > -----Original Message----- > > From: Scott Hamm [mailto:[EMAIL PROTECTED] > > Sent: 02 August 2005 15:12 > > To: 'Mysql ' > > Subject: STORED PROCEDURE > > > > I'm used with MS SQL and could not understand MySQL's > > document. I'm trying to create something like the simple example > > > > DECLARE @title varchar(255) > > SET @title='%Unconditional%' > > SELECT @title; > > > > How do I get around to it in MySQL? > > > > -- > > Power to people, Linux is here. > > > > -- > > No virus found in this incoming message. > > Checked by AVG Anti-Virus. > > Version: 7.0.338 / Virus Database: 267.9.8/61 - Release Date: > > 01/08/2005 > > > > > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.0.338 / Virus Database: 267.9.8/61 - Release Date: 01/08/2005 > > > Something similiar to CREATE PROCEDURE Select_title() BEGIN DECLARE u_title varchar(255) SET u_title='%Unconditional%' SELECT T.Title, B.BAND_Name, C.Type, T.Track FROM Title T LEFT JOIN Bands B ON B.BandID=T.B_ID LEFT JOIN CD_Type C ON C.CD_ID=T.C_ID WHERE Title LIKE u_title ORDER BY Title; END;
-- Power to people, Linux is here.