<< < 1 2 3 4 5 6 7 8 9 10 > >>   Sort: Date

Passing Values to User Defined Function Parameters in SQL Server
How To Provide Values to User Defined Function Parameters in SQL Server Transact-SQL? If a user defined function is created with parameters, you need pass values to those parameters when calling the function with one of two formats listed below: expression... function_name(value_1, value_2, ... valu...
2016-12-18, 204👍, 0💬

AdventureWorksLT - Downloading and Installing the Sample Database in SQL Server
How to download and install the scaled-down database AdventureWorksLT in SQL Server? If you want to practice you DBA skills with the scaled-down version of the sample database AdventureWorksLT provided by Microsoft, you should follow this tutorial to download and install it first: 1. Go to the SQL S...
2016-12-02, 204👍, 0💬

System Databases Used by SQL Servers in SQL Server
What are system databases in SQL Server? System databases are created by the SQL Server itself during the installation process. System databases are used by the SQL server to help manage other user databases and client execution sessions. SQL Server 2005 Express Edition uses 4 system databases: mast...
2016-11-20, 204👍, 0💬

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<100 BEGIN SET @count = @count + 1; SET @var = SY...
2017-02-22, 203👍, 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, 202👍, 0💬

What Are NULL Values in SQL Server
What Are NULL Values in SQL Server Transact-SQL? A NULL value is a special value that represents an unknown value. SQL Server supports NULL values with the following features: All data types used for table columns support NULL values. In another word, NULL values can be stored in database tables. In...
2017-02-05, 202👍, 0💬

Sample Databases Are Provided by Microsoft in SQL Server
What Sample Scripts and Sample Databases Are Provided by Microsoft in SQL Server? In order to help you to learn SQL Server, Microsoft provides several free sample scripts and sample databases. SqlServerSamples.msi - 25,469 KB: Sample scripts. AdventureWorksDB.msi - 28,053 KB: Sample OLTP database: A...
2016-12-04, 202👍, 0💬

"CREATE USER" Statements - Creating a User in SQL Server
How to create a user to access a database using "CREATE USER" statements in SQL Server? This is the second tutorial of a quick lesson on creating login and configure users for databases with Transact-SQL statements. Granting a user access to a database involves three steps. First, you create a login...
2016-11-27, 202👍, 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, 201👍, 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, 201👍, 0💬

Using User Defined Functions in Expressions in SQL Server
How To Use User Defined Functions in Expressions in SQL Server Transact-SQL? An user defined function must return a value, which can be used in any expression as long as the return value data type matches the expression. To execute a user defined function and use its return value in an expression, y...
2016-12-24, 201👍, 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, 201👍, 0💬

Installing Sample Scripts and Databases in SQL Server
Where to find answers to frequently asked questions on Installing Sample Scripts and Databases in SQL Server? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Installing Sample Scripts and Databases in SQL Server. Clear answers are provided with tu...
2016-12-04, 201👍, 0💬

bin2hex - Converting Binary Strings into Hexadecimal Character Strings in SQL Server
How To Convert Binary Strings into Hexadecimal Character Strings in SQL Server? When a query returns a binary string value to the client tool, it will be displayed by the client tool as hexadecimal digits in a character string format. But they are hexadecimal digits on the display window, not in the...
2017-02-25, 200👍, 0💬

Converting Date and Time Values into Integers in SQL Server
Can Date and Time Values Be Converted into Integers in SQL Server Transact-SQL? Can date and time values be converted into integers? The answer is yes. The resulting integer will be the number days relative the base date: Jan 1, 1900. The time of the day will be rounded to days. But there several ru...
2017-02-22, 200👍, 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, 200👍, 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, 200👍, 0💬

Downloading and Installing SQL Server Sample Scripts in SQL Server
How to download and install SQL Server 2005 Sample Scripts in SQL Server? If you want to learn from sample scripts provided by Microsoft, you should follow this tutorial to download and install them: 1. Go to the SQL Server 2005 Samples and Sample Databases download page. 2. Go to the x86 section in...
2016-12-04, 200👍, 0💬

What Is a SQL*Loader Control File in Oracle
What Is a SQL*Loader Control File in Oracle? A SQL*Loader control file a text that defines how data files should be loaded into the database. It allows you to specify: Where is the input data file. The format of the input date file. The target table where the data should be loaded. How input data fi...
2016-11-27, 200👍, 0💬

Working with NULL Values in SQL Server Transact-SQL
Where to find answers to frequently asked questions on Working with NULL Values in SQL Server Transact-SQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Working with NULL Values in SQL Server Transact-SQL. Clear explanations and tutorial exerci...
2017-02-08, 199👍, 0💬

NULL Values Involved in String Operations in SQL Server
What Happens If NULL Values Are Involved in String Operations in SQL Server Transact-SQL? If NULL values are involved in string operations, the result will be string NULL values. The following tutorial script shows you some good examples: SELECT 'FyiCenter'+NULL; GO ---------- NULL SELECT LEN(NULL);...
2017-02-05, 199👍, 0💬

Performing Comparison on Character Strings in SQL Server
How To Perform Comparison on Character Strings in SQL Server Transact-SQL? Comparison operations on character strings are performed based on the associated collation. Each collation defines rules on how characters are ordered, how character cases and accents are treated, etc. The tutorial exercise b...
2017-01-21, 199👍, 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, 199👍, 0💬

"CREATE VIEW/PROCEDURE" Statements - Creating a View and a Stored Procedure in SQL Server
How to create a view and a stored procedure using "CREATE VIEW/PROCEDURE" statements in SQL Server? This is the third tutorial of a quick lesson on creating login and configure users for databases with Transact-SQL statements. Granting a user access to a database involves three steps. First, you cre...
2016-11-27, 199👍, 0💬

<< < 1 2 3 4 5 6 7 8 9 10 > >>   Sort: Date