私は次のことを試しました -
次のようにコマンドプロンプトで変数を作成しました-
mysql> set @myId = 1;
Query OK, 0 rows affected (0.00 sec)
次に、それを表示するために、次のことを試しましたが成功しませんでした-
mysql> show myId;
ERROR 1064 (42000): 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 'myId' at line 1
mysql> show @myId;
ERROR 1064 (42000): 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 '@myId' at line 1
mysql> PRINT @myId;
ERROR 1064 (42000): 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 'PRINT @myId' at line 1
mysql> PRINT myId;
ERROR 1064 (42000): 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 'PRINT myId' at line 1
では、どのように の値を表示できます@myId
か?