<< < 8 9 10 11 12 13 14 15 16 17 18 > >>   ∑:464  Sort:Date

Database Engine Tutorials from SQL Server 2005 Books Online
How to use Transact-SQL statements to access the database engine in SQL Server? Transact-SQL statements can be used to access the database engine directly. Here are some good tutorials provided by the SQL Server 2005 Books Online. See the SQL Server 2005 Tutorials &gt; Database Engine Tutorials ...
2016-11-27, 1449🔥, 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, 1449🔥, 0💬

Differences of CHAR and NCHAR in SQL Server Transact-SQL
What Are the Differences between CHAR and NCHAR in SQL Server Transact-SQL? Both CHAR and NCHAR are fixed length data types in Transact-SQL. But they have the following main differences: CHAR stores characters based on the code page with 1 byte per character most of the time. NCHAR stores characters...
2017-04-04, 1447🔥, 0💬

Location of Database Files in SQL Server
Where is my database stored on the hard disk in SQL Server? If a database is created with simple CREATE DATABASE statement, the server will create two database files on the hard disk to store data and configuration information about that data bases: database_name.mdf - SQL Server Database Primary Da...
2016-11-24, 1447🔥, 0💬

Duplicate Key Error on Primary Key Columns in SQL Server
What Happens If You Insert a Duplicate Key for the Primary Key Column in SQL Server? If your table has a primary key column, and you are trying to insert a new row with duplicate key value on the primary key column, you will get an error. The reason is simple - Primary key column does not allow dupl...
2016-11-02, 1445🔥, 0💬

Sorting Query Output in Descending Order in SQL Server
How To Sort Query Output in Descending Order in SQL Server? If you want to sort a column in descending order, you can specify the DESC keyword in the ORDER BY clause. The following SELECT statement first sorts the "tag" in descending order, then sorts the "counts" in ascending order: SELECT tag, cou...
2016-10-26, 1444🔥, 0💬

Overflow Errors on Converting Big Values to Integers in SQL Server
What Happens When Converting Big Values to Integers in SQL Server Transact-SQL? If you are converting a numeric expression to an integer data type and the value is too big for integer storage size, you will get an arithmetic overflow error as shown in the following examples: -- Overflow error on imp...
2017-03-22, 1443🔥, 0💬

Assigning NULL Values to Variables or Columns in SQL Server
How To Assign NULL Values to Variables or Columns in SQL Server Transact-SQL? The rule for assigning NULL values to variables or table columns is simple: Use keyword "NULL" directly as normal values. "NULL" can be used in SET statements to assign NULL values to variables. "NULL" can be used in SET c...
2017-02-05, 1440🔥, 0💬

Determining Data Types of View Columns in SQL Server
How Column Data Types Are Determined in a View in SQL Server? When you define a view, its columns are defined through a list of expressions in the underlying SELECT statement. Their data types will be determined implicitly by the expressions. For example, if the column expression is a column name of...
2016-11-03, 1439🔥, 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, 1438🔥, 0💬

Entering Date and Time Values in SQL Server
How To Enter Date and Time values in SQL Server Transact-SQL? Transact-SQL does not support date and time literals. If you want to enter date and time values, you have to use character string literals and rely implicit casting rules to convert them into date and time values. When casting character s...
2017-04-15, 1437🔥, 0💬

Performing Comparison on Floating Point Numbers in SQL Server
How To Perform Comparison on Floating Point Numbers in SQL Server Transact-SQL? Comparison operations on approximate (floating point) numbers are also easy to understand. Just watch out rounding operations performed during conversions. Here are two examples of floating point number comparisons: -- R...
2017-01-21, 1436🔥, 0💬

Managing Databases and Physical Files in SQL Server
Where to find answers to frequently asked questions on Managing Databases and Physical Files in SQL Server? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Managing Databases and Physical Files in SQL Server. Clear answers are provided with tutori...
2016-11-24, 1431🔥, 0💬

Difference Between Clustered and Non-Clustered Indexes in SQL Server
What Is the Difference Between Clustered and Non-Clustered Indexes in SQL Server? SQL Server 2005 supports two types of indexes: clustered index and non-clustered index. Here are the main differences between them: One table can only have only one clustered index. One table can only have many non-clu...
2016-11-13, 1430🔥, 0💬

Importance of Column Order in the SET Clause in Update Statements in SQL Server
Is the Order of Columns in the SET Clause Important in SQL Server? The answer is NO. The order of columns in the SET clause of the UPDATE statement is NOT important. You probably already noticed from the previous tutorial. There is a BIG DIFFERENCE among SQL Server, MySQL and Oracle on update multip...
2016-11-02, 1430🔥, 0💬

NULL Values Involved in Arithmetic Operations in SQL Server
What Happens If NULL Values Are Involved in Arithmetic Operations in SQL Server Transact-SQL? If NULL values are involved in arithmetic operations, the result will be numeric NULL values. The following tutorial script shows you some good examples: SELECT 7+NULL; GO ----------- NULL SELECT 10.02*NULL...
2017-02-05, 1428🔥, 0💬

"CREATE LOGIN" - Creating a New Login Name in SQL Server
How To Create a New Login Name in SQL Server in SQL Server? In previous tutorials, it is assumed that you use the "sa" (System Administrator) login name to connect to your SQL Server. But that is not what a normal developer uses to connect to the server, since "sa" has the ALL permissions granted. Y...
2016-10-20, 1424🔥, 0💬

EXISTS - Testing Subquery Results in SQL Server
How To Test Subquery Results with the EXISTS Operator in SQL Server Transact-SQL? EXISTS is a special operator used to test subquery results. EXISTS can be used in two ways: EXISTS (SELECT ...) -- Returns TRUE if the specified subquery has one or more rows returned. NOT EXISTS (SELECT ...) -- Return...
2017-01-21, 1421🔥, 0💬

Deleting a Table That Is Used by a View in SQL Server
What Happens If You Delete a Table That Is Used by a View in SQL Server? Assuming that you have a table which is used by a view, and you try to delete that table. SQL Server will let you delete the table without any trouble. But that view will become invalid. The tutorial exercise below shows you wh...
2016-11-04, 1421🔥, 0💬

Database in Use When Dropping a Database in SQL Server
Why I am getting this error when dropping a database in SQL Server? If you are trying to drop a database that is in use, you will get an error message like this: 'Cannot drop database "FyiCenterData" because it is currently in use.' Before dropping a database, you must stop all client sessions using...
2016-11-24, 1420🔥, 0💬

What Is an Expression in SQL Server
What Is an Expression in SQL Server Transact-SQL? An expression is a combination of identifiers, values, and operators that SQL Server 2005 can evaluate to obtain a numeric value. A simple expression could be a constant, a function, a column name, a variable, or a subquery without any operators. Com...
2017-04-01, 1418🔥, 0💬

"CREATE USER" - Creating a User Name in a Database in SQL Server
How To Create a User Name in a Database in SQL Server? User names are security principals at the database level. If you want to allow a login name to access a specific database, you need to create a user name in that database and link it to the login name. Creating a user name can be done by using t...
2016-10-19, 1417🔥, 0💬

Creating Local Temporary Stored Procedures in SQL Server
How To Create a Local Temporary Stored Procedure in SQL Server Transact-SQL? A local temporary stored procedure is a special stored procedure that: Is created like a normal (permanent) stored procedure with the name prefixed with a number sign (#). Are only valid in the same client session where it ...
2016-12-28, 1414🔥, 0💬

NULL Values Involved in Bitwise Operations in SQL Server
What Happens If NULL Values Are Involved in Bitwise Operations in SQL Server Transact-SQL? If NULL values are involved in bitwise operations, the result will be binary NULL values. The following tutorial script shows you some good examples: SELECT 1 | NULL; GO ----------- NULL SELECT 707 &amp; N...
2017-02-03, 1413🔥, 0💬

<< < 8 9 10 11 12 13 14 15 16 17 18 > >>   ∑:464  Sort:Date