How to check current dtabase name ?

How to check current dtabase name ?

Post by Bernard Go » Tue, 22 Jul 2003 08:48:30



Hi All,

Is there anyway I can return the current database name I am accessing ?

 
 
 

How to check current dtabase name ?

Post by Stjepan Puljk » Tue, 22 Jul 2003 09:10:47


select db_name()


Quote:> Hi All,

> Is there anyway I can return the current database name I am accessing ?


 
 
 

1. SELECT current warehouse name with second latest warehouse name for a inventory iten

Greeting All,

I have a table call inventory_movement_t

move_id  control_no    inventory_id    warehouse_name     date_in
1             1                   8                    tokyo
Dec 1, 2002
2             1                   3                    new york
Dec 2, 2002
3             2                   8                    london
Dec 2, 2002
4             2                   3                    paris
Dec 5, 2002
5             3                   3                    london
Dec 7, 2002
6             4                   3                    zurich
Dec 8, 2002

need help a resultset set below,


inventory_id     from_warehouse           to_warehouse
------------     -----------------           --------------
8                      tokyo                            london
3                      new york                      paris

yvonne

2. Paradox 9 Distribution Expert not recognizing last disk

3. Checking current state of a scheduled job...

4. free/share ware RDBMS

5. How to check current configuration?

6. how do you find which ole db providers work with adodb.connection.defaultdatabase?

7. How do I check the current configuration?

8. Need help tunning AIO/CPU vps

9. Checking current state of a scheduled job...

10. How to check current configuration?

11. Checking current login

12. Check if current record satisfies WHERE criteria

13. How to check current database in SQL