검색결과 리스트
글
링크: http://dev.mysql.com/doc/refman/5.1/en/sql-syntax-prepared-statements.html
mysql> SET @s = 'SELECT SQRT(POW(?,2) + POW(?,2)) AS hypotenuse';
mysql> PREPARE stmt2 FROM @s;
mysql> SET @a = 6;
mysql> SET @b = 8;
mysql> EXECUTE stmt2 USING @a, @b;
+------------+
| hypotenuse |
+------------+
| 10 |
+------------+
mysql> DEALLOCATE PREPARE stmt2;
'DB / NoSQL > MariaDB/MySQL' 카테고리의 다른 글
[MySQL] Host 'xxx.xxx.xxx' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts' (0) | 2014.11.15 |
---|---|
[MySQL] MySQL Cursor (0) | 2014.10.16 |
[Mysql] Function, Procecure dump (0) | 2014.08.06 |
[MySQL] Update Join (0) | 2014.07.30 |
[MySQL] Workbench의 Update Delete시 Error Code 1175 (0) | 2014.05.19 |
RECENT COMMENT