About 792,000 results
Open links in new tab
  1. "use database_name" command in PostgreSQL - Stack Overflow

    I am beginner to PostgreSQL. I want to connect to another database from the query editor of Postgres - like the USE command of MySQL or MS SQL Server. I found \\c databasename by …

  2. sql server - How can I do something like: USE @databaseName

    Sep 24, 2010 · I'm running a script in SQL Management Studio. And I want to define the database in the variable. You've told me how to do that. But still for some reason inside a transaction, …

  3. sql server - sql use statement with variable - Stack Overflow

    It appears SSMS validates the existence of the database for all USE statements in the script, even if those lines aren't executed. I was trying a variant of: IF @@SERVERNAME = …

  4. postgresql - How to switch databases in psql? - Stack Overflow

    Oct 16, 2010 · A MySQL "database" is in fact a schema. Therefor in most cases, MySQL's "databases" would better be mapped to schemas in Postgres anyway. And if that is done, you …

  5. database - When to begin T-SQL query with USE? - Stack Overflow

    Jan 4, 2010 · The USE statement changes the current database for the connection, so if one statement expects to run in the MyDatabase database (but doesn't specify it with a USE …

  6. using "USE" keyword Vs. full table name in T-SQL

    Feb 18, 2014 · I'd tend to use [server].[database].[schema].[table] in instances where a script may query mutliple tables from multiple databases. The USE [database] would typically be used in …

  7. sql server - Use Go After 'Use [Database_Name]? - Stack Overflow

    Oct 24, 2017 · USE Name_Of_My_Database GO As far as I can tell, there is no point to this, is there? I have tried looking for the answer in the places listed below, and it's absent: What is …

  8. SQL-Server: Error - Exclusive access could not be obtained …

    Dec 17, 2019 · Msg 3101, Level 16, State 1, Line 3 Exclusive access could not be obtained because the database is in use. Msg 3013, Level 16, State 1, Line 3 RESTORE DATABASE is …

  9. sql - EXEC to USE Database - Stack Overflow

    Sep 2, 2014 · DECLARE @Use VARCHAR(50) SET @Use = 'USE ' + @NewDatabaseName EXEC(@Use) Running it manually - the database doesn't get 'USED'. How can I execute the …

  10. Use database inside a stored procedure - Stack Overflow

    Nov 17, 2011 · SQL Server gives us a system stored procedure to do this. My understanding is that the recommended method would be to use sys.sp_grantdbaccess: