I'm trying to create a passoff script for a database class and don't want to
restrict the students to using the names which I'm using.

I suspect that this can't be done so I'm just going to require them to use
the same table and field names that I'm using, but if I'm wrong and it can
be done I'd be happy to know how.


SET @db = 'University';
SELECT @db FROM DUAL;
+------------+
| @db        |
+------------+
| University |
+------------+
1 row in set (0.00 sec)
USE @db;
ERROR 1049 (42000): Unknown database '@db'
SET @table = 'Class';
Query OK, 0 rows affected (0.00 sec)
SELECT * FROM @table;
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 '@table' at line 1


AJ ONeal

Reply via email to