以下是MySQL 使用者變數的屬性-
mysql> SET @A = 'MySQL'; Query OK, 0 rows affected (0.00 sec) mysql> Select @A, @a; +-------+-------+ | @A | @a | +-------+-------+ | MySQL | MySQL | +-------+-------+ 1 row in set (0.00 sec)
mysql> Set @table_name = CONCAT('tbl_','Employee'); Query OK, 0 rows affected (0.00 sec) mysql> Create Table @table_name(Id Int); ERROR 1064 (42000): You have an error in your SQL syntax near '@table_name(Id Int)'
mysql> SET @name = 'Rahul'; Query OK, 0 rows affected (0.00 sec) mysql> Select @name; +-------+ | @name | +-------+ | Rahul | +-------+ 1 row in set (0.00 sec)
mysql> SET @name = 'Raman'; Query OK, 0 rows affected (0.00 sec) mysql> Select @name; +-------+ | @name | +-------+ | Raman | +-------+ 1 row in set (0.00 sec)
以上是MySQL使用者變數有哪些屬性?的詳細內容。更多資訊請關注PHP中文網其他相關文章!