← Back to team overview

maria-discuss team mailing list archive

New Question: SET Variable statement

 

Hello,

A new question has been asked in "MariaDB Community" by cisaksen. Please answer it at http://mariadb.com/kb/en/set-variable-statement/ as the person asking the question may not be subscribed to the mailing list.

--------------------------------
I'm trying to write a SQL script that creates a database and a few other things.

I'm having trouble with a user defined variable statement.

SET @dbname = CAST(trees AS VARCHAR(10));    
comes directly from https://mariadb.com/kb/en/mariadb/user-defined-variables/

And I keep getting --> Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VARCHAR(10))' at line 1

Running MariaDB 10.0.20 on SLES 12, I have no idea what the problem is ?

--------------------------------

To view or answer this question please visit: http://mariadb.com/kb/en/set-variable-statement/