Unsupported Screen Size: The viewport size is too small for the theme to render properly.

Problem In Creating Stored Procedure

forums forums SQLyog Query Builder and Schema Designer Problem In Creating Stored Procedure

This topic contains 1 reply, has 0 voices, and was last updated by  pseudocod 6 years, 4 months ago.

  • Author
    Posts
  • #12834

    pseudocod
    Member

    DELIMITER //

    CREATE PROCEDURE NEW_CUST(IN c_name VARCHAR(50),IN c_fname VARCHAR(50),IN c_g_n VARCHAR(50),IN c_address VARCHAR(50),IN c_city VARCHAR(50),IN c_cont INT)

    BEGIN

    INSERT INTO customer_info(c_name,c_fname,c_g_n,c_address,c_city,c_contact)

    VALUES(c_name,c_fname,c_g_n,c_address,c_city,c_contact)

    END//

    DELIMITER ;

    i m not able to compile this 'new_cust' stored procedure. Please make me correct.

    sqlYog is reporting this error number : 1064

    Error Description : 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 5…

    Actually I m from sql server background and got to work with mysql. Hope you would understand my problem.

    Thank you!

  • #33926

    shubh
    Member

    Hi,

    Although I am answering to your problem., but this forum is for discussions on issues related to SQLyog, not MySQL.

    You have not placed ';' in your insert query. Corrected one is written below:

    DELIMITER //

    CREATE PROCEDURE NEW_CUST(IN c_name VARCHAR(50),IN c_fname VARCHAR(50),IN c_g_n VARCHAR(50),IN c_address VARCHAR(50),IN c_city VARCHAR(50),IN c_cont INT)

    BEGIN

    INSERT INTO customer_info(c_name,c_fname,c_g_n,c_address,c_city,c_contact)

    VALUES(c_name,c_fname,c_g_n,c_address,c_city,c_contact);

    END//

    DELIMITER ;

  • #33927

    pseudocod
    Member
    'shubh' wrote:

    Hi,

    Although I am answering to your problem., but this forum is for discussions on issues related to SQLyog, not MySQL.

    Thank you so much for your time here. However, I would keep this thing in my mind for future reference. Thanks again sir!

You must be logged in to reply to this topic.