1 2 3 4 5 6 > >>   Sort: Date

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, 585👍, 0💬

DDL (Data Definition Language) Statements for Tables? in SQL Server
What are DDL (Data Definition Language) statements for tables in SQL Server? DDL (Data Definition Language) statements are statements to create and manage data objects in the database. The are three primary DDL statements to create and manage tables: CREATE TABLE - Creating a new table. ALTER TABLE ...
2016-11-20, 526👍, 0💬

SQL Server Database Tutorials
Where to find SQL Server database server tutorials? Here is a collection of tutorials, tips and FAQs for SQL Server DBA and SQL Server database application developers. Clear explanations and sample scripts provided can be used as learning tutorials or interview preparation guides. It doesn't matter ...
2016-10-18, 486👍, 0💬

Counting Rows with the COUNT(*) Function in SQL Server
How To Count Rows with the COUNT(*) Function in SQL Server? If you want to count the number of rows, you can use the COUNT(*) function in the SELECT clause. The following tutorial exercise shows you some good examples: SELECT COUNT(*) FROM fyi_links GO 7 SELECT COUNT(*) FROM fyi_links WHERE url LIKE...
2016-10-26, 478👍, 0💬

Managing Security, Login and User in SQL Server
Where to find answers to frequently asked questions on Managing Security, Login and User in SQL Server? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Managing Security, Login and User in SQL Server. Clear answers are provided with tutorial exerc...
2016-10-20, 456👍, 0💬

WHILE ... Loops in SQL Server Transact-SQL
How to execute statements in loops in SQL Server Transact-SQL? How to use WHILE ... loops? You can use WHILE ... statements to execute statements in loops in Transact-SQL using these syntaxes: -- Loop with a single statement WHILE condition statement -- Loop with a statement block WHILE condition --...
2017-01-11, 454👍, 0💬

READ_ONLY/READ_WRITE - Database Update Options in SQL Server
How to set database to be READ_ONLY in SQL Server? Databases in SQL Server have two update options: READ_WRITE - Data objects are allowed to be queried and modified. This is the default. READ_ONLY - Data objects are allowed to be queried, but not allowed to be modified. You can use the "ALTER DATABA...
2016-11-20, 453👍, 0💬

CONTINUE to Next Loop Iteration in SQL Server Transact-SQL
How to continue to the next iteration of a WHILE loop in SQL Server Transact-SQL? How to use CONTINUE statements? You can use the CONTINUE statement to continue to the next iteration of a WHILE loop by skipping the rest of statement block of the current iteration using this syntax: WHILE condition B...
2017-01-11, 439👍, 0💬

Connecting SQL Server Management Studio Express To a SQL Server in SQL Server
How to connect SQL Server Management Studio Express to SQL Server 2005 Express in SQL Server? Once you have SQL Server 2005 Express installed and running on your local machine, you are ready to connect SQL Server Management Studio Express to the server: Click Start > Programs > Microsoft SQL S...
2016-12-04, 439👍, 0💬

CREATE TABLE - Creating New Tables in SQL Server
How to create new tables with "CREATE TABLE" statements in SQL Server? If you want to create a new table, you can use the "CREATE TABLE" statement. The following tutorial script shows you how to create a table called "tip": CREATE TABLE tip (id INTEGER PRIMARY KEY, subject VARCHAR(80) NOT NULL, desc...
2016-11-17, 439👍, 0💬

IF ... ELSE Statement in SQL Server Transact-SQL
How to execute statements under given conditions in SQL Server Transact-SQL? How to use IF ... ELSE statements? You can use IF ... ELSE statements to execute statements under given conditions in Transact-SQL using these syntaxes: IF condition statement_1 IF condition statement_1 ELSE statement_2 IF ...
2017-01-11, 437👍, 0💬

What Is Microsoft SQL Server in SQL Server
What is Microsoft SQL Server in SQL Server? Microsoft SQL Server is a relational database management system (RDBMS) developed by Microsoft. It runs on Windows systems and uses Transact-SQL as the query language. Microsoft SQL Server release history: 1993 - SQL Server 4.21 for Windows NT 1995 - SQL S...
2016-12-08, 435👍, 0💬

EXECUTE - Executing Stored Procedures in SQL Server
How To Execute a Stored Procedure in SQL Server Transact-SQL? If you want execute a stored procedure created previously, you can use the EXECUTE statement in the following formats: EXEC procedure_name; EXECUTE procedure_name; The key word EXEC is actually optional. So you can execute a stored proced...
2017-01-05, 433👍, 0💬

GO - Sending a Statement Batch from "sqlcmd" in SQL Server
How To Use GO Command in "sqlcmd" in SQL Server? "sqlcmd" is a command line client application to run Transact-SQL statements on a target SQL Server. When "sqlcmd" is started and connected to a SQL Server, it will start a new batch and prompt you to enter the first statement of the batch. You can en...
2016-12-04, 429👍, 0💬

DATEADD() Function Usage Examples in SQL Server
How To Use DATEADD() Function in SQL Server Transact-SQL? DATEADD() is a very useful function for manipulating date and time values. The following tutorial exercise shows you some good DATEADD() usage examples: -- Incrementing 1 year on a leap date DECLARE @birth_date DATETIME; SET @birth_date = '20...
2017-02-20, 428👍, 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, 419👍, 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, 418👍, 0💬

Generating CREATE VIEW Scripts on Existing Views in SQL Server
How To Generate CREATE VIEW Script on an Existing View in SQL Server? If you want to know how an existing view was created, you can use SQL Server Management Studio to automatically generate a "CREATE VIEW" script The following tutorial shows you how to do this: 1. Run SQL Server Management Studio a...
2016-11-05, 417👍, 0💬

"CREATE PROCEDURE" - Creating Simple Stored Procedures in SQL Server
How To Create a Simple Stored Procedure in SQL Server Transact-SQL? If you want to create a simple stored procedure with no input and output parameters, you can use the "CREATE PROCEDURE" command with a statement batch in a simple format as shown in below: CREATE PROCEDURE procedure_name AS statemen...
2017-01-05, 406👍, 0💬

Creating a View with Data from Multiple Tables in SQL Server
Can You Create a View with Data from Multiple Tables in SQL Server? Can You Create a View with Data from Multiple Tables? The answer is yes. A view can be created with a SELECT statement to join data from multiple tables. It is a common practice to normalize data into multiple tables. Then using a v...
2016-11-05, 402👍, 0💬

Downloading and Installing SQL Server 2005 Express Edition
Where to find answers to frequently asked questions on Downloading and Installing SQL Server 2005 Express Edition? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Downloading and Installing SQL Server 2005 Express Edition. Clear answers are provid...
2016-12-08, 401👍, 0💬

Creating Multi-Statement Table-Value Functions in SQL Server
How To Create an Multi-Statement Table-Valued Function in SQL Server Transact-SQL? To create a multi-statement table-valued function, you need to define a temporary table as the returning table in the function. INSERT statements should be used to insert data into the returning table. The tutorial ex...
2016-10-17, 401👍, 0💬

DROP_EXISTING - Recreating an Existing Index in SQL Server
How To Recreate an Existing Index in SQL Server? If you want to change the definition of an existing index, you can use the "DROP INDEX" statement to drop the index first. Then use the "CREATE INDEX" statement to create it again with the new definition. But you can also combine those two statements ...
2016-11-08, 395👍, 0💬

Downloading and Installing SQL Server Management Studio Express in SQL Server
How to download and install Microsoft SQL Server Management Studio Express in SQL Server? Microsoft SQL Server Management Studio Express (SSMSE) is a free, easy-to-use graphical management tool for managing SQL Server 2005 Express Edition and SQL Server 2005 Express Edition with Advanced Services. I...
2016-12-04, 394👍, 0💬

1 2 3 4 5 6 > >>   Sort: Date