SoftTree Technologies SoftTree Technologies
Technical Support Forums
RegisterSearchFAQMemberlistUsergroupsLog in
$DB$ content

 
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant View previous topic
View next topic
$DB$ content
Author Message
gemisigo



Joined: 11 Mar 2010
Posts: 2109

Post $DB$ content Reply with quote
The snippet macro drop-down menu describes $DB$ as "Connection database name". What does this mean? Is this database that is changed by "USE mydatabase"? I created a snippet containing
Code:

$$SELECT DATABASE()$$
$DB$

but its result is
Code:

mydatabase
noDB

The login window for Query Browser also states "mydatabase" as the default schema.
Wed Jun 16, 2010 9:36 am View user's profile Send private message
SysOp
Site Admin


Joined: 26 Nov 2006
Posts: 7849

Post Reply with quote
That $DB$ macro makes no sense for MySQL. So called MySQL databases are nothing more than database schemas. The $DB$ macro is for the level above the schema level.

To get the current schema name within a snippet, you can use DATABASE() built-in MySQL function.
Wed Jun 16, 2010 9:51 am View user's profile Send private message
Display posts from previous:    
Reply to topic    SoftTree Technologies Forum Index » SQL Assistant All times are GMT - 4 Hours
Page 1 of 1

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


 

 

Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Flowers Online.