If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > delimiter / stored procedure issue [newbie]

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-03-04, 02:18
soatley soatley is offline
Registered User
 
Join Date: Apr 2004
Posts: 1
delimiter / stored procedure issue [newbie]

Hello all...
I am trying to work with MySQL as a newbie, coming from SQL Server. I have read the documentation and can't figure this one out though! Essentially, if someone could provide me with a 'real world' example, I would be a happy guy!

I want to input a username (say the number is 123456789) and I want it to output a 'yesno' field....

select count(*) as yesno from mydb.customer where username=<input value here of 123456789>

In SQL Server, it is something like
CREATE PROCEDURE sp_MyProc
@uname INT
AS
select Count(*) as yesno from customer where username=@uname
RETURN

Can anyone help me?!?! Hope so, cause MySQL looks to be a nice program other wise... also, I am on version 5.0 alpha because from what I read, that is the version I need to be on for stored procedures. Alternatively, there might be a better suggestion that someone could lend...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On