<< < 1 2 3 4 5 6 7 8 > >>   ∑:509  Sort:Date

Updating Multiple Rows with One UPDATE Statement in SQL Server
How To Update Multiple Rows with One UPDATE Statement in SQL Server? If the WHERE clause in an UPDATE statement matches multiple rows, the SET clause will be applied to all matched rows. This rule allows you to update values on multiple rows in a single UPDATE statement. Here is a good example: SELE...
2016-11-02, 3570🔥, 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, 3567🔥, 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, 3566🔥, 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, 3525🔥, 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, 3500🔥, 0💬

Getting Year, Month and Day Out of DATETIME Values in SQL Server
How To Get Year, Month and Day Out of DATETIME Values in SQL Server Transact-SQL? You can use DATEPART() to get any part of the DATETIME value. But to get year, month and day, you can use 3 specific functions: YEAR(), MONTH() and DAY(). These functions are equivalent to DATEPART() as: YEAR(date) = D...
2017-02-14, 3477🔥, 0💬

DATEDIFF() - Calculating DATETIME Value Differences in SQL Server
How To Calculate DATETIME Value Differences Using the DATEDIFF() Function in SQL Server Transact-SQL? If you want to calculate the difference between two date and time values, you can use the DATEDIFF() function in the following format: DATEDIFF(datepart, startdate, enddate) returns INT: "startdate"...
2017-02-20, 3459🔥, 0💬

Running Queries with SQL Server Management Studio Express in SQL Server
How to run Queries with SQL Server Management Studio Express in SQL Server? 1. Launch and connect SQL Server Management Studio Express to the local SQL Server 2005 Express. 2. Click on the "New Query" button below the menu line. Enter the following SQL statement in the query window: SELECT 'Welcome ...
2016-12-04, 3455🔥, 0💬

UPDATE Subquery Returning Multiple Rows in SQL Server
What Happens If the UPDATE Subquery Returns Multiple Rows in SQL Server? If a subquery is used in a UPDATE statement, it must return exactly one row for each row in the update table that matches the WHERE clause. If it returns multiple rows, SQL Server will give you an error message. To test this ou...
2016-11-02, 3443🔥, 0💬

What Is SQL Server Transact-SQL (T-SQL)?
What is SQL Server Transact-SQL (T-SQL)? SQL Server Transact-SQL, also called T-SQL, is an extension of the standard SQL (Structured Query Language). Transact-SQL was developed by Microsoft and Sybase. Microsoft's implementation ships in the Microsoft SQL Server product. Sybase uses the language in ...
2017-06-16, 3431🔥, 0💬

CHARINDEX() and SUBSTRING() - Locating and Taking Substrings in SQL Server
How To Locate and Take Substrings with CHARINDEX() and SUBSTRING() Functions in SQL Server Transact-SQL? Transact-SQL is not a language designed for manipulating strings, but it does have two simple functions to locate and take substrings: CHARINDEX() and SUBSTRING(). The tutorial exercise below ass...
2017-03-07, 3431🔥, 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, 3404🔥, 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, 3395🔥, 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, 3392🔥, 0💬

"sys.tables" - Getting a List of All Tables in SQL Server
How To Get a List of All Tables with "sys.tables" View in SQL Server? If you want to see the table you have just created, you can use the "sys.tables" system view to get a list of all tables in the current database. The tutorial script gives you a good example: SELECT name, type_desc, create_date FR...
2018-03-29, 3371🔥, 1💬

💬 2018-03-29 Eric: That works. Thanks!

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, 3361🔥, 0💬

sys.sql_modules - Getting User Defined Function Definitions Back in SQL Server
How To Get the Definition of a User Defined Function Back in SQL Server Transact-SQL? If you want get the definition of an existing user defined function back from the SQL Server, you can use the system view called sys.sql_modules, which stores definitions of functions, stored procedures, and views....
2016-12-18, 3314🔥, 0💬

Generating CREATE TABLE Script on Existing Tables in SQL Server
How To Generate CREATE TABLE Script on an Existing Table in SQL Server? If you want to know how an existing table was created, you can use SQL Server Management Studio to automatically generate a "CREATE TABLE" script The following tutorial shows you how to do this: 1. Run SQL Server Management Stud...
2016-11-17, 3314🔥, 0💬

Is SQL Server Transact-SQL Case Sensitive?
Is SQL Server Transact-SQL case sensitive? No. Transact-SQL is not case sensitive. Like the standard SQL, you can type in your Transact-SQL statement in upper case or lower case. However, you should use upper case for all key words in Transact-SQL statements as a best practice. The following example...
2017-06-16, 3309🔥, 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, 3277🔥, 0💬

"USE" - Setting the Current Database in SQL Server
How to set the current database in SQL Server? Once you are connected to the SQL Server, you should select a database to work with and set it as the current database using the "USE" statement with this syntax: USE database_name The following tutorial example shows you how to set "FyiCenterData" as t...
2016-11-24, 3275🔥, 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, 3265🔥, 0💬

"GROUP BY" - Dividing Query Output into Multiple Groups in SQL Server
How To Divide Query Output into Multiple Groups with the GROUP BY Clause in SQL Server? Sometimes, you want to divide the query output into multiple groups, and apply group functions on each individual groups. Dividing query output into multiple groups can be done with the GROUP BY clause. Here is t...
2016-10-25, 3222🔥, 0💬

SQL Server Transact-SQL Language References
Where to find SQL Server Transact-SQL language references? You can find SQL Server Transact-SQL language references on Microsoft Website: Transact-SQL Reference for SQL Server 2016 Transact-SQL Reference for SQL Server 2014 Transact-SQL Reference for SQL Server 2012 Transact-SQL Reference for SQL Se...
2017-05-20, 3215🔥, 0💬

<< < 1 2 3 4 5 6 7 8 > >>   ∑:509  Sort:Date