About 5,710,000 results
Open links in new tab
  1. SQL Server - stop or break execution of a SQL script

    Mar 19, 2009 · Is there a way to immediately stop execution of a SQL script in SQL server, like a "break" or "exit" command? I have a script that does some validation and lookups before it …

  2. sql - Script to kill all connections to a database (More than ...

    In my case, I'm using SQL Server 14.0 with Management Studio 17.9.1, and I have to say this is the only answer thats works to me. I was wanting to delete some databases wich accomplish a …

  3. SQL Server query to find all permissions/access for all users in a ...

    Aug 13, 2011 · I would like to write a query on a sql 2008 that will report all the users that have access to a specific database, or objects within the database such as tables, views, and stored …

  4. Script that provides the row counts and table names

    Maybe you easily said how to I provide table names and row counts? Pseudo SQL: for "select tablename from system.Tables" into :tablename execute "select count(*) from ? into ?" using …

  5. How to run SQL script in MySQL? - Stack Overflow

    Jan 20, 2012 · From Workbench: File > Run SQL Script -- then follow prompts From Windows Command Line: Option 1: mysql -u usr -p mysql> source file_path.sql Option 2: mysql -u usr …

  6. sql - Can I create a One-Time-Use Function in a Script or Stored ...

    In SQL Server 2005, is there a concept of a one-time-use, or local function declared inside of a SQL script or Stored Procedure? I'd like to abstract away some complexity in a script I'm …

  7. How to run sql script using SQL Server Management Studio?

    Apr 22, 2012 · 29 Open SQL Server Management Studio > File > Open > File > Choose your .sql file (the one that contains your script) > Press Open > the file will be opened within SQL …

  8. database - Need help understanding the difference between a …

    Oct 12, 2012 · A SQL script is nothing but when, you save a bunch of SQL statements (select, insert delete, update etc) in a file.

  9. Create SQL INSERT Script with values gathered from table

    Nov 20, 2012 · I need to create a INSERT script in order to insert in another database the same data. If in SQL Server I select "Script table as > INSERT To" I can easily recreate the skeleton …

  10. sql server - Script for rebuilding and reindexing the fragmented …

    Can anyone provide the script for rebuilding and re-indexing the fragmented index when 'avg_fragmentation_in_percent' exceeds certain limits (better if cursor is not used)?