<< < 31 32 33 34 35 36 37 38 39 40 41 > >>   ∑:1243  Sort:Rank

Differences of CHAR and VARCHAR in SQL Server Transact-SQL
What Are the Differences between CHAR and VARCHAR in SQL Server Transact-SQL? CHAR and VARCHAR are both used to store code page based 1-byte character strings in Transact-SQL. But they have the following main differences: CHAR(n) stores character strings with a fixed length, n bytes, storage format....
2017-04-04, 1618🔥, 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, 1527🔥, 0💬

SET Statements in SQL Server Transact-SQL
How to assign value to a variable in SQL Server Transact-SQL? How to use the SET statements? In Transact-SQL, you can use SET statements to assign values to variables using the assignment operator =, in the syntax of: SET @variable = &lt;value&gt; When an SET statement is executed, the syste...
2017-04-04, 1509🔥, 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, 1443🔥, 0💬

PRINT Statements in SQL Server Transact-SQL
How to print value on console in SQL Server Transact-SQL? How to use the PRINT statements? In Transact-SQL, you can use PRINT statements to print values on the console of the client tool, in the syntax of: PRINT &lt;value&gt; When a PRINT statement is executed, the system will: Print the val...
2017-04-01, 2456🔥, 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, 1839🔥, 0💬

CONVERT/CAST Function in SQL Server Transact-SQL
How to convert value from one data type to another in SQL Server Transact-SQL? How to use the CONVERT function or the CAST function? In Transact-SQL, you can use CONVERT statements to convert values from one data type to another, in the syntax of: CONVERT(data_type, value[, style]) In this syntax, "...
2017-04-01, 1699🔥, 0💬

Numeric Expressions and Functions in SQL Server Transact-SQL
Where to find answers to frequently asked questions on Numeric Expressions and Functions in SQL Server Transact-SQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Numeric Expressions and Functions in SQL Server Transact-SQL. Clear answers are pr...
2017-04-01, 1521🔥, 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, 1413🔥, 0💬

CAST() - Converting Numeric Expression Data Types in SQL Server
How To Convert Numeric Expression Data Types using the CAST() Function in SQL Server Transact-SQL? If you want to convert the data type of a numeric expression to a new data type, you can use the CAST(expression AS data_type) function. The tutorial exercise below shows you how to use the CAST() func...
2017-03-27, 3133🔥, 0💬

CONVERT() - Converting Numeric Expression Data Types in SQL Server
How To Convert Numeric Expression Data Types using the CONVERT() Function in SQL Server Transact-SQL? If you want to convert the data type of a numeric expression to a new data type, you can use the CONVERT(data_type, expression) function. The tutorial exercise below shows you how to use the CONVERT...
2017-03-27, 3092🔥, 0💬

Converting Numeric Data Types by Assignment Operations in SQL Server
How To Convert Numeric Expression Data Types by Assignment Operations in SQL Server Transact-SQL? An assignment operation is used to assign an expression to a variable, a column, or a parameter. If the data type of the expression does not match the data type of the receiving variable, column, or par...
2017-03-27, 1501🔥, 0💬

Converting Numeric Expressions from One Data Type to Another in SQL Server
How To Convert a Numeric Expression from One Data Type to Another in SQL Server Transact-SQL? There are 4 ways to convert a numeric expression from one data type to another data type: Implicit conversion by arithmetic operations - When arithmetic operations are performed on expressions of different ...
2017-03-27, 1481🔥, 0💬

Arithmetic Operations with Different Data Types in SQL Server
What Happens to an Arithmetic Operation with Two Different Data Types in SQL Server Transact-SQL? When two expressions with different data types are put together for an arithmetic operation, the expression with a lower rank data type will be converted automatically to higher rank data type. Usually,...
2017-03-27, 1477🔥, 0💬

FLOOR, CEILING, ROUND - Converting Values to Integers in SQL Server
How To Convert Numeric Values to Integers in SQL Server Transact-SQL? Sometimes you need to round a numeric value into an integer. SQL Server 2005 offers you a number of ways to do this: FLOOR(value) - Returning the largest integer less than or equal to the input value. The returning data type is th...
2017-03-22, 4959🔥, 0💬

CONVERT() - Converting Character Strings to Numeric Values in SQL Server
How To Convert Character Strings into Numeric Values in SQL Server Transact-SQL? Sometimes you need to convert numeric values enclosed in character strings back to numeric values by using the CONVERT() function. When converting character strings to values with CONVERT(), you need to remember two rul...
2017-03-22, 3266🔥, 0💬

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

Mathematical Functions Supported by SQL Server 2005 in SQL Server
What Are the Mathematical Functions Supported by SQL Server 2005 in SQL Server Transact-SQL? SQL Server 2005 supports 23 mathematical functions: ABS, ACOS, ASIN, ATAN, ATN2, CEILING, COS, COT, DEGREES, EXP, FLOOR, LOG, LOG10, PI, POWER, RADIANS, RAND, ROUND, SIGN, SIN, SQRT, SQUARE, and TAN. The ret...
2017-03-22, 1499🔥, 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, 1438🔥, 0💬

RAND() - Generating Random Numbers in SQL Server
How To Generate Random Numbers with the RAND() Function in SQL Server Transact-SQL? Random numbers are very useful for generating test data, passwords, or other security related data. SQL Server 2005 offers you the random number generator function RAND in two format: RAND(seed) - Starting a new sequ...
2017-03-11, 5886🔥, 0💬

ROUND() - Rounding Values to Specific Precisions in SQL Server
How To Round a Numeric Value To a Specific Precision in SQL Server Transact-SQL? Sometimes you need to round a numeric value to a specific precision. For example, you may want to round values in your financial statement to the precision of 1000.00. This can be done by the ROUND() function with the f...
2017-03-11, 5135🔥, 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, 1898🔥, 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, 1538🔥, 0💬

Concatenating Two Character Strings in SQL Server
How To Concatenate Two Character Strings Together in SQL Server Transact-SQL? Concatenating two character strings together is most commonly used string operation. SQL Server 2005 allows to concatenate two character strings into a single string with the (+) operator. The following tutorial exercise s...
2017-03-11, 1510🔥, 0💬

<< < 31 32 33 34 35 36 37 38 39 40 41 > >>   ∑:1243  Sort:Rank