<< < 5 6 7 8 9 10 11 12 13 14 15 > >>   ∑:469  Sort:Date

Verify Time Precision in SQL Server Transact-SQL
How to verify the precession of the server system time in SQL Server Transact-SQL? You can run a WHILE loop to check the precision of server system time in Transact-SQL as shown below: DECLARE @var DATETIME2(7); DECLARE @count INT = 0; WHILE @count&lt;100 BEGIN SET @count = @count + 1; SET @var ...
2017-02-22, 1579🔥, 0💬

"DROP" Statements - Deleting database objects in SQL Server
How to delete database objects with "DROP" statements in SQL Server? To remove all database objects created by previous tutorials, you could just delete the database. However, in this tutorial, you will go through the steps to reverse every action you took doing the tutorial. Removing permissions an...
2016-11-27, 1570🔥, 0💬

Using Wildcard Characters in LIKE Operations in SQL Server
How To Use Wildcard Characters in LIKE Operations in SQL Server Transact-SQL? Wildcard character '%' can be used in the pattern string for the LIKE operator to match any string of zero or more characters. The following example uses '%Sport% Store' to search all company names that has a partial word ...
2017-01-21, 1568🔥, 0💬

Casting Numeric Values to DATETIME in SQL Server Transact-SQL
Can I cast numeric values to DATETIME values in SQL Server Transact-SQL? Yes, you can cast numeric values to DATATIME values in Transact-SQL. The implicit casting rules are for numeric values to DATETIME values are: Numeric values are casted linearly to DATETIME values. Decimal 0 represents 1900-01-...
2017-04-15, 1566🔥, 0💬

Time-Only DATETIME Values in SQL Server Transact-SQL
What Happens If Time-Only Values Are Provided for DATETIME variables in SQL Server Transact-SQL? If only time value is provided in a DATETIME variable, the SQL Server will pad the date value with a zero, representing the base date, January 1, 1900. The tutorial exercise below gives you some good exa...
2017-04-08, 1565🔥, 0💬

What Are Comparison Operations in SQL Server
What Are Comparison Operations in SQL Server Transact-SQL? Comparison operations return Boolean values by comparing the relative positions of two operands. SQL server supports the following comparison operations: = (Equal To): Returns Boolean true, if two operands are equal in value. &gt; (Great...
2017-01-29, 1565🔥, 0💬

System Requirements for SQL Server 2005 Express Edition in SQL Server
What are the requirements to install SQL Server 2005 Express Edition in SQL Server? The following system requirements cover the SQL Server 2005 Express Edition: Processor 32-bit Processor of 600-megahertz (MHz) or faster Operating System Windows XP with Service Pack 2 or later Windows 2000 Professio...
2016-12-08, 1565🔥, 0💬

Adding and Removing Days on Date and Time Values in SQL Server
How To Add or Remove Days on Date and Time Values in SQL Server Transact-SQL? SQL Server 2005 only support two operators on data and time values: + (Add): Adding days to a date and time value. - (Subtract): Removing days from a date and time value. Note that to add or subtract days on a date and tim...
2017-02-22, 1559🔥, 0💬

Performing Comparison on Exact Numbers in SQL Server
How To Perform Comparison on Exact Numbers in SQL Server Transact-SQL? Comparison operations on exact numbers of data types: BIT, INT, NUMERIC, etc., are very easy to understand. Here are some simple examples: -- BIT value comparison DECLARE @x BIT, @y BIT; SET @x = 0; SET @y = 1; SELECT CASE WHEN @...
2017-01-21, 1557🔥, 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, 1557🔥, 0💬

List of Data Types in SQL Server Transact-SQL
How many data types supported in SQL Server Transact-SQL? I want a list of all data types. Here is a list of all Transact-SQL data types divided into 6 categories: 1. Exact Number - Used to hold numeric values truncated to a specific precision and scale. BIGINT - Used to hold big integers. INT (or I...
2017-04-22, 1553🔥, 0💬

Verifying a Login Name with SQLCMD Tool in SQL Server
How To Verify a Login name with SQLCMD Tool in SQL Server? The quickest way to verify a login name on a SQL Server is probably to use the SQLCMD tool, which takes the server name, login name and password in a single command line. Here is how to try it yourself: Start a command window and enter the f...
2016-10-20, 1552🔥, 0💬

"DROP LOGIN" - Deleting a Login Name in SQL Server
How To Delete a Login Name in SQL Server? If you don't want to keep a login name any more, you should delete it by using the "DROP LOGIN" statement as shown in this tutorial example: -- Login with "sa" DROP LOGIN Dba_Login; GO Command(s) completed successfully. -- View login names SELECT name, sid, ...
2016-10-19, 1546🔥, 0💬

String Type Conversion During Concatenation in SQL Server
What Happens When Unicode Strings Concatenate with Non-Unicode Strings in SQL Server Transact-SQL? If a Unicode string NVARCHAR is concatenated with a non-Unicode string VARCHAR, SQL Server will implicitly convert the non-Unicode string to Unicode string for concatenation. DECLARE @regcode VARCHAR(4...
2017-03-11, 1545🔥, 0💬

Downloading and Installing SQL Server 2005 Books Online in SQL Server
How to download and install SQL Server 2005 Books Online in SQL Server? 1. Go to the SQL Server 2005 Books Online download page . 2. Click the download button, the File Download box shows up. Save the download file to c:\temp. 3. Double click on the downloaded file: c:\temp\SqlServer2K5_BOL_Feb20 07....
2016-12-04, 1542🔥, 0💬

"ALTER FUNCTION" - Modifying Existing Functions in SQL Server
How To Modify an Existing User Defined Function in SQL Server Transact-SQL? If you find a mistake in an existing function previously created, you can drop (delete) it and create it again correctly. But dropping a function may affect other database objects who are depending on this function. So the b...
2016-12-18, 1541🔥, 0💬

Default Schema of Your Login Session in SQL Server
What Is the Default Schema of Your Login Session in SQL Server? When you login to a SQL Server and select a database to use, SQL Server will assign your login session a default schema. The schema name can be omitted when you refer to objects in the default schema. Here is what you should remember ab...
2016-10-22, 1541🔥, 0💬

Index Slowing Down INSERT Statements in SQL Server
Does Index Slows Down INSERT Statements in SQL Server? If you want to see the impact of indexes on INSERT statements, you can repeat the same insert script on the table "fyi_links" of the same structure with two indexes: one non-clustered index on column "url" and one non-clustered index on column "...
2016-11-13, 1539🔥, 0💬

Exact Numeric Data Types in SQL Server Transact-SQL
What are exact numeric data types supported in SQL Server Transact-SQL? Exact numeric data types are used to hold numeric values truncated to a specific precision and scale. There are 8 different exact numeric data types supported in SQL Server Transact-SQL: 1. BIGINT - Used to hold big integers wit...
2017-04-22, 1535🔥, 0💬

NULL Values Involved in Boolean Operations in SQL Server
What Happens If NULL Values Are Involved in Boolean Operations in SQL Server Transact-SQL? If NULL values are involved in Boolean operations, the result will vary depending on the operator type. For AND operator, FALSE takes precedence over NULL. The result can be summarized in a table below: AND TR...
2017-02-03, 1534🔥, 0💬

DECLARE Statements in SQL Server Transact-SQL
How to declare a variable in SQL Server Transact-SQL? How to use the DECLARE statements? In Transact-SQL, you must use DECLARE statements to declare variables. Declaring a variable is to define the variable name and the variable data type. In Transact-SQL, you can: Declare a single variable in a sin...
2017-04-04, 1532🔥, 0💬

Adding Address Records into AdventureWorksLT in SQL Server
How to add an address record into AdventureWorksLT in SQL Server? To find out if we can add data into AdventureWorksLT or not, you can try to add an address record into the "SalesLT.Address" in AdventureWorksLT: USE AdventureWorksLT GO INSERT SalesLT.Address (AddressLine1, City, StateProvince, Count...
2016-12-02, 1532🔥, 0💬

"IS NULL" - Testing NULL Values in SQL Server
How To Test NULL Values Properly in SQL Server Transact-SQL? From previous tutorials, you learned that comparing expressions with NULL will always result NULL. So you can not use comparison operators to test if an expression represents a NULL value or not. To test expressions for NULL values, you sh...
2017-02-03, 1530🔥, 0💬

"sp_help" - Getting a List of Columns in a View in SQL Server
How To Get a List of Columns in a View using the "sp_help" Stored Procedure in SQL Server? Another way to get a list of columns from a view is to use the "sp_help" stored procedure. "sp_help" returns more than just a list of columns. It returns: the view information, the column information, the iden...
2016-11-05, 1530🔥, 0💬

<< < 5 6 7 8 9 10 11 12 13 14 15 > >>   ∑:469  Sort:Date