Popular Posts
Math function 函數 說明 ABS(N) 絕對值 SIGN(N) N>0 : 1, N=0 : 0, N<0 : -1 CEIL(N) 大於N的最小整數值 ... JDateField package bruce.lib.swing; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.A... Translating 2.0 <html> <head>     <title>Translation 2.0</title>     <meta http-equiv="content-type" content="text...
Stats
Execute a STRING as a query
MySQL:
BEGIN
    SET @sql = CONCAT('SELECT * FROM ', table_name, ' WHERE id = ', vID);
    PREPARE stmt FROM @sql;
    EXECUTE stmt;
    DEALLOCATE PREPARE stmt;
END
BEGIN
    PREPARE stmt1 FROM 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse';
    SET @a = 3;
    SET @b = 4;
    EXECUTE stmt1 USING @a, @b;
    DEALLOCATE PREPARE stmt1;
END;