<< < 13 14 15 16 17 18 19 20 > >>   Sort: Rank

Verifying a User Name with SQLCMD Tool in SQL Server
How To Verify a User name with SQLCMD Tool in SQL Server? The quickest way to verify a user name in a database is probably to use the SQLCMD tool. You can connect to the server, select the database, and check which user name is linked the current login name as shown below. Start a command window and...
2016-10-18, 216👍, 0💬

Finding the Login Name Linked to a Given User Name in SQL Server
How To Find the Login Name Linked to a Given User Name in SQL Server? If you know a user name in a database and you want to find out which login name is linked this user name, you need to check the Security ID (SID) of the user name based on the following rules: Each login name is associated a uniqu...
2016-10-18, 186👍, 0💬

"DROP USER" - Deleting a Database User in SQL Server
How To Delete an Existing Database User in SQL Server? If you don't want to keep a database user any more, you should delete the user by using the "DROP USER" statement. This tutorial exercise shows how to delete "Dba_User": -- Login with "sa" USE FyiCenterData; GO DROP USER Dba_User; GO -- List all...
2016-10-18, 185👍, 0💬

SQL Server Database Tutorials
Where to find SQL Server database server tutorials? Here is a collection of tutorials, tips and FAQs for SQL Server DBA and SQL Server database application developers. Clear explanations and sample scripts provided can be used as learning tutorials or interview preparation guides. It doesn't matter ...
2016-10-18, 421👍, 0💬

About dba.FYIcenter.com Website
What is dba.FYIcenter.com Website about? dba.FYIcenter.com is a Website for DBAs (database administrators) and database application developers looking for database server management tips, database programming tutorials, career information, and so on. Just browse through the site, you will find the b...
2016-10-17, 1326👍, 0💬

Creating Multi-Statement Table-Value Functions in SQL Server
How To Create an Multi-Statement Table-Valued Function in SQL Server Transact-SQL? To create a multi-statement table-valued function, you need to define a temporary table as the returning table in the function. INSERT statements should be used to insert data into the returning table. The tutorial ex...
2016-10-17, 368👍, 0💬

"DECLARE ... CURSOR" - Declaring Cursor Objects in SQL Server
How To Declare a Cursor with "DECLARE ... CURSOR" in SQL Server Transact-SQL? If you want to use a cursor to represent the result set of a query, you need to define a cursor name with a SELECT sub-statement using the "DECLARE ... CURSOR" statement using the following syntax format: DECLARE cursor_na...
2016-10-17, 219👍, 0💬

Using Cursors in SQL Server Transact-SQL
Where to find answers to frequently asked questions on Using Cursors in SQL Server Transact-SQL? I want to loop through rows in a result set. Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Using Cursors in SQL Server Transact-SQL. Clear explanati...
2016-10-17, 192👍, 0💬

"OPEN" - Executing the Query of a Cursor in SQL Server
How To Execute the Cursor Queries with "OPEN" Statements in SQL Server Transact-SQL? Once a cursor is declared, you need to execute the query attached to the cursor so that the result set returned from the query can be accessed through the cursor. To execute the cursor query, you should use the OPEN...
2016-10-17, 179👍, 0💬

"FETCH" - Fetching the Next Row from a Cursor in SQL Server
How To Fetch the Next Row from a Cursor with a "FETCH" Statement in SQL Server Transact-SQL? When the result set is ready in a cursor, you can use a FETCH statement to retrieve one row from the result set in the same format as a SELECT statement. The FETCH statement has the following formats: FETCH ...
2016-10-17, 178👍, 0💬

What Are Cursors in SQL Server
What Are Cursors in SQL Server Transact-SQL? A cursor is a special data type that represents a result set returned by a SELECT query statement. There are several notes about cursor you need to remember: Cursor data type can not be used to define table columns. Cursor data type is used on store proce...
2016-10-17, 168👍, 0💬

"@@FETCH_STATUS" - Looping through Result Set in SQL Server
How To Loop through the Result Set with @@FETCH_STATUS in SQL Server Transact-SQL? The FETCH statement only returns one row from the result set. If you want to return all rows, you need to put the FETCH statement in a loop. A simple way to stop the loop to check the system variable @@FETCH_STATUS, w...
2016-10-17, 295👍, 0💬

DYNAMIC - Creating Dynamic Cursors in SQL Server
How To Create a Dynamic Cursor with the DYNAMIC Option in SQL Server Transact-SQL? If the underlying table is changed after the cursor is opened, should the changes be reflected in the cursor result set? The answer is based on the update option used when creating the cursor. SQL SERVER supports two ...
2016-10-17, 242👍, 0💬

SCROLL - Creating Cursors for Backward Scrolling in SQL Server
How To Create a Scrollable Cursor with the SCROLL Option in SQL Server Transact-SQL? SQL Server offers two scrolling option on cursors: 1. FORWARD_ONLY - The cursor can only be scrolled forward with "FETCH NEXT" statements. In another word, you can only loop through the cursor from the first row to ...
2016-10-17, 181👍, 0💬

Declaring and Using Cursor Variables in SQL Server
How To Declare and Use Cursor Variables in SQL Server Transact-SQL? There are two ways to representing a cursor: 1. A cursor name - A static name representing a cursor object. A cursor name should be linked to a cursor object in the DECLARE statement. 2. A cursor variable name - A variable name poin...
2016-10-17, 178👍, 0💬

"FETCH" - Transferring Data from Cursors to Variables in SQL Server
How To Transfer Data from a Cursor to Variables with a "FETCH" Statement in SQL Server Transact-SQL? By default, a FETCH statement will display the fetched row on the client program window. If you want to transfer the output data to variables, you can specify an INTO clause with a list of variables ...
2016-10-17, 170👍, 0💬

SQL Server Transact-SQL Tutorials
Where to find tutorials to answer some frequently asked questions on Microsoft SQL Server Transact-SQL? I want to know how to write database scripts to run on SQL Server. Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team about Microsoft SQL Server Tran...
2016-10-17, 277👍, 0💬

Turn on and off Autocommit in MySQL
How To Switch between Autocommit-On and Autocommit-Off Modes in MySQL? By default, your connection session will be in Autocommit-On mode, where every server executable statement will start a new transaction, and end the transaction when the execution ends. Changes will be committed. So consider this...
2016-10-17, 197👍, 0💬

Show the Current Transaction Mode in MySQL
How To Find Out the Current Transaction Mode in MySQL? If you are not sure about your current transaction mode, you can use the "SELECT @@AUTOCOMMIT FROM DUAL" statement to find out as shown in the following tutorial exercise: >\mysql\bin\mysql -u dev -piyf fyi mysql> SELECT @@AUTOCOMMIT FROM ...
2016-10-17, 194👍, 0💬

Create a Table for Transaction Testing in MySQL
How To Create a Table for Transaction Testing in MySQL? If you want to learn transaction management, you should create a table with the InnoDB storage engine. The default storage engine MyISAM does not support the transaction concept. The tutorial exercise below shows you a good example of creating ...
2016-10-17, 193👍, 0💬

Ways to Start a New Transaction in MySQL
How To Start a New Transaction in MySQL? MySQL server offers two modes to manage transactions: Autocommit On - Default mode. Can be started with "SET AUTOCOMMIT = 1" command. In this mode, every single SQL statement is a new transaction. All changes will be committed at the end of the statement exec...
2016-10-17, 189👍, 0💬

Start a New Transaction Explicitly in MySQL
How To Start a New Transaction Explicitly in MySQL? If you are confused on the implicit new transaction rules, you can always start a new transaction with the "START TRANSACTION" command to start a new transaction explicitly. "START TRANSACTION" command works in both "Autocommit On" and "Autocommit ...
2016-10-17, 183👍, 0💬

Commit the Current Transaction in MySQL
How To Commit the Current Transaction in MySQL? If you have used some DML statements updated some data objects, and you want to have the updates to be permanently recorded in the database, you can use the COMMIT command. It will make all the database changes made in the current transaction become pe...
2016-10-17, 182👍, 0💬

Transaction Committed when DDL Statement Executed in MySQL
What Happens to the Current Transaction If a DDL Statement Is Executed in MySQL? If a DDL statement is executed, the current transaction will be committed and ended. All the database changes made in the current transaction will become permanent. This is called an implicit commit by a DDL statement. ...
2016-10-17, 180👍, 0💬

<< < 13 14 15 16 17 18 19 20 > >>   Sort: Rank