Announcement

Announcement Module
Collapse
No announcement yet.

Empty set error

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Empty set error

    Guys,

    I can run an update query from command line and it updates records but if I'm running same query from a procedure it returns empty set. Any idea why? The update query is below.

    1. Create function Age

    2. Update table set column1 = Age(column2)

    3. CREATE DEFINER = 'root'@'localhost' PROCEDURE `Age_new`()
    NOT DETERMINISTIC
    MODIFIES SQL DATA
    SQL SECURITY DEFINER
    COMMENT ''
    BEGIN
    Update Related Set Age = Age(column2);
    END;

    4. call Age_new

  • #2
    The procedure itself can possibly execute many queries -- all which affect rows.

    Rather than give you the sum of affected rows, mysql just tells you no rows were affected.

    Comment

    Working...
    X