Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. MySQL
  4. Stored Procedure

Stored Procedure

Scheduled Pinned Locked Moved MySQL
databasehelpsharepointmysqlsysadmin
2 Posts 2 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    NET India
    wrote on last edited by
    #1

    Hello Friends, I'm creating procedures as the code below but it's raising an problem. DELIMITER $$ DROP PROCEDURE IF EXISTS `SP_Select` $$ CREATE PROCEDURE `SP_Select` (id int) BEGIN Select ID from Rough where ID=id END $$ DELIMITER ; Here is the error i'm getting shown below Script line: 3 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 'END' at line 3

    B 1 Reply Last reply
    0
    • N NET India

      Hello Friends, I'm creating procedures as the code below but it's raising an problem. DELIMITER $$ DROP PROCEDURE IF EXISTS `SP_Select` $$ CREATE PROCEDURE `SP_Select` (id int) BEGIN Select ID from Rough where ID=id END $$ DELIMITER ; Here is the error i'm getting shown below Script line: 3 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 'END' at line 3

      B Offline
      B Offline
      briogene
      wrote on last edited by
      #2

      You need to study your SQL Syntax's..... The error from your stored procedure is on the line "Select ID from Rough Where ID =id " that line should end with a semicolon.....and hence should read "Select ID from Rough Where ID =id;" The Stored procedure should look something like this DELIMITER $$ DROP PROCEDURE IF EXISTS `SP_Select` $$ CREATE PROCEDURE `SP_Select` (id int) BEGIN Select ID from Rough where ID=id; END $$ DELIMITER ;

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups