<< < 2 3 4 5 6 7 8 9 10 11 12 > >>   ∑:469  Sort:Date

"LEFT OUTER JOIN ... ON" - Writing Queries with Left Outer Joins in SQL Server
How To Write a Query with a Left Outer Join in SQL Server? If you want to query from two tables with a left outer join, you can use the LEFT OUTER JOIN ... ON clause in the FROM clause. The following query returns output with a left outer join from two tables: fyi_links and fyi_rates. The join condi...
2016-10-30, 1933🔥, 0💬

"ALTER INDEX ... REORGANIZE" - Defragmenting Indexes in SQL Server
How To Defragment Indexes with ALTER INDEX ... REORGANIZE in SQL Server? When an index is defragmented to a small percentage, like &lt; 30%, you can use the "ALTER INDEX ... REORGANIZE" statement to defragment the index. Here is a tutorial exercise on defragmenting indexes: USE FyiCenterData; GO...
2016-11-08, 1925🔥, 0💬

Setting New Values to Parts of a DATETIME Value in SQL Server
How To Set Different Parts of a DATETIME Value in SQL Server Transact-SQL? In SQL Server, you can get different parts of a DATETIME value with the DATEPART() functions. But there is no function that allows you to set different parts to a DATETIME value. For example, you a date_of_birth column as DAT...
2017-02-08, 1923🔥, 0💬

sys.indexes - Viewing Existing Indexes on an Given Table in SQL Server
How To View Existing Indexes on an Given Table using sys.indexes in SQL Server? Another way to view existing indexes defined for a given table is to use the system view called "sys.indexes". The tutorial exercise shows you how many indexes were defined from the previous tutorial on table "fyi_links"...
2016-11-15, 1920🔥, 0💬

"ALTER TABLE ... ADD" - Adding New Columns to Existing Tables in SQL Server
How To Add a New Column to an Existing Table with "ALTER TABLE ... ADD" in SQL Server? If you have an existing table with existing data rows, and want to add a new column to that table, you can use the "ALTER TABLE ... ADD" statement. The tutorial script below shows you a good example: ALTER TABLE t...
2016-11-17, 1918🔥, 0💬

Character Strings and Binary Strings in SQL Server Transact-SQL
Where to find answers to frequently asked questions on Character Strings and Binary Strings in SQL Server Transact-SQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Character Strings and Binary Strings in SQL Server Transact-SQL. Clear answers ...
2017-03-11, 1910🔥, 0💬

"INNER JOIN ... ON" - Writing Queries with Inner Joins in SQL Server
How To Write a Query with an Inner Join in SQL Server? If you want to query from two tables with an inner join, you can use the INNER JOIN ... ON clause in the FROM clause. The tutorial exercise below creates another testing table and returns output with an inner join from two tables: fyi_links and ...
2016-10-30, 1899🔥, 0💬

Passing Values to Stored Procedure Parameters in SQL Server
How To Provide Values to Stored Procedure Parameters in SQL Server Transact-SQL? If a stored procedure is created with parameters, you need pass values to those parameters when calling the stored procedure with one of two formats listed below: -- Passing values only EXEC procedure_name value_1, valu...
2016-12-28, 1888🔥, 0💬

sys.triggers - Listing All Triggers in the Database in SQL Server
How To List All Triggers in the Database with sys.triggers in SQL Server? If you want to list all triggers defined in the current database, you can use the catalog view, sys.triggers, as shown in the following tutorial example: USE FyiCenterData; GO CREATE TRIGGER new_user ON fyi_users AFTER INSERT ...
2016-10-25, 1880🔥, 0💬

Using SELECT Statements on Views in SQL Server
Can SELECT Statements Be Used on Views in SQL Server? Select (query) statements can be used on views in the same way as tables. The following tutorial exercise helps you creating a view and running a query statement on the view: CREATE VIEW myLinks AS SELECT * FROM fyi_links WHERE url LIKE '%fyi%' G...
2016-10-26, 1877🔥, 0💬

Collation - Character Code Page in SQL Server Transact-SQL
What Is a Collation in SQL Server Transact-SQL? A collation in Transact-SQL is a set of specifications defining a character set and its sorting rules. SQL Server support a large number of built-in collations. For example: Albanian_CI_AI_KS_WS - Albanian, case-insensitive (CI), accent-insensitive (AI...
2017-05-13, 1873🔥, 0💬

Statement Batch in SQL Server Transact-SQL
What is statement batch in SQL Server Transact-SQL? A statement batch is a group of one or more Transact-SQL statements sent at the same time from an application to SQL Server for execution. SQL Server compiles the statements of a batch into a single executable unit, called an execution plan. The st...
2017-05-29, 1863🔥, 0💬

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

Rules on Arithmetic Operations in SQL Server
What Are Arithmetic Operators in SQL Server Transact-SQL? An arithmetic operator performs an arithmetic operation on two expressions of numeric data types. SQL Server supports 5 arithmetic operators: + (Add): Addition - (Subtract): Subtraction * (Multiply): Multiplication / (Divide): Division % (Mod...
2017-04-01, 1856🔥, 0💬

Unicode Character Data Types in SQL Server Transact-SQL
What are Unicode character string data types supported in SQL Server Transact-SQL? Unicode character string data types are used to hold Unicode character strings. There are 3 Unicode character string data types supported in SQL Server Transact-SQL: 1. NCHAR (or NATIONAL CHAR, or NATIONAL CHARACTER) ...
2017-04-08, 1852🔥, 0💬

Differences of DECIMAL and FLOAT in SQL Server
What Are the Differences between DECIMAL and FLOAT in SQL Server Transact-SQL? DECIMAL and FLOAT are both used to store numerical values. But they have the following main differences: DECIMAL(p,s) stores values with the decimal point fixed at the position of s (scale) digits from the right. The tota...
2017-04-15, 1847🔥, 0💬

Approximate Numeric Data Types in SQL Server Transact-SQL
What are approximate numeric data types supported in SQL Server Transact-SQL? Approximate numeric data types are used to hold numeric values with floating scales. There are 3 different approximate numeric data types supported in SQL Server Transact-SQL: 1. FLOAT - Used to hold values with different ...
2017-04-19, 1841🔥, 0💬

Default Collation in SQL Server Transact-SQL
How To Find Out What Is the Default Collation in SQL Server Transact-SQL? The default collation of a database comes from the server if you are not using the COLLATE clause in the CREATE DATABASE statement. If you are not using the COLLATE clause for character string column, it will use the default c...
2017-05-13, 1834🔥, 0💬

Improving the Trigger to Handle NULL Values in SQL Server
How To Improve the Trigger to Handle NULL Values in SQL Server? When a NULL value is concatenated with a string, the result will be a null value. So if you want the trigger to properly report NULL values, you need to enhance the trigger as shown in the following tutorial example: USE FyiCenterData; ...
2016-10-24, 1801🔥, 0💬

Creating Stored Procedures with Statement Blocks in SQL Server
How To Create a Stored Procedure with a Statement Block in SQL Server Transact-SQL? If you are creating a stored procedure with multiple statements, it's better to use "BEGIN ... END" to group all statements into a single statement block. The tutorial exercise below shows you some good examples: USE...
2017-01-05, 1799🔥, 0💬

Using Stored Procedures in SQL Server Transact-SQL
Where to find answers to frequently asked questions on Using Stored Procedures in SQL Server Transact-SQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Using Stored Procedures in SQL Server Transact-SQL. Clear answers are provided with tutorial...
2017-01-11, 1778🔥, 0💬

Generating CREATE FUNCTION Scripts on Existing Functions in SQL Server
How To Generate CREATE FUNCTION Script on an Existing Function in SQL Server Transact-SQL? If you want to know how an existing user defined function was created, you can use SQL Server Management Studio to automatically generate a "CREATE FUNCTION" script The following tutorial shows you how to do t...
2016-12-18, 1772🔥, 0💬

Converting DATETIME and NUMERIC Values in SQL Server
Are DATETIME and NUMERIC Values Convertible in SQL Server Transact-SQL? Are datetime and numeric value convertible? The answer is yes. Here are the main rules on DATATIME and NUMERIC value conversions: During the conversion a DATETIME value will be treated as a NUMERIC value with the number of days ...
2017-02-22, 1764🔥, 0💬

Truncating DATETIME Values to Dates without Time in SQL Server
How To Truncate DATETIME Values to Dates without Time in SQL Server Transact-SQL? Assuming that you have some date and time, DATETIME, values, and you want to work with dates only. You want to truncate them to dates without time, or with time of 00:00:00.000. Again, SQL Server offers no simple solut...
2017-02-08, 1746🔥, 0💬

<< < 2 3 4 5 6 7 8 9 10 11 12 > >>   ∑:469  Sort:Date