Welcome to Sign in | Help

Re: cum aflu numele bazei de date curente

  •  11-13-2007, 3:12 PM

    Re: cum aflu numele bazei de date curente

    Dacă tot vrem metode complicate pentru a face un lucru simplu, putem folosi:

    SELECT DISTINCT TABLE_CATALOG AS [Current Database] FROM INFORMATION_SCHEMA.TABLES

    Şi asta are avantajul de a fi ceva mai portabil, pentru că view-urile INFORMATION_SCHEMA fac parte din standardul SQL-92 ... Stick out tongue

    Răzvan

View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems