Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2005
    Posts
    362

    Unanswered: query with parameter

    I use mysql command prompt and I use the query with parameter as oracle, meaning type
    Code:
    select a from mytable where a=@a
    where @a I will give at command prompt when the prompt will ask for that, how can I do that?

  2. #2
    Join Date
    Jan 2005
    Posts
    362
    I find this
    Code:
    PREPARE stmt1 FROM 'SELECT * from `shop3` where dealer=?';
     SET @a = 'a';
     EXECUTE stmt1 USING @a;
     DEALLOCATE PREPARE stmt1;
    How can I set the command promp to ask for the value?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •