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

Creating a Logon Trigger in Express Edition in SQL Server
Can You Create a Logon Trigger in SQL Server 2005 Express Edition in SQL Server? Can you create a logon trigger in SQL Server 2005 Express Edition? The answer is no. LOGON is not a supported event type in Express Edition. The script below shows you the error message when you try to create a logon tr...
2016-10-22, 1743🔥, 0💬

Variables and Data Types in SQL Server Transact-SQL
Where to find answers to frequently asked questions on variables and data types in Microsoft SQL Server Transact-SQL? I am new to Transact-SQL and SQL Server. Here is a list of frequently asked questions and their answers compiled by FYIcenter.com team on variables and data types in Microsoft SQL Se...
2017-04-22, 1739🔥, 0💬

Start and End of Statement in SQL Server Transact-SQL
How to start and end a statement in SQL Server Transact-SQL? Here are some simple rules about writing statements in SQL Server Transact-SQL: A Transact-SQL statement must be started with a pre-defined statement keyword. A Transact-SQL statement must be ended with a new line (/n) or a semicolon (;) c...
2017-05-29, 1736🔥, 0💬

Performing Comparison on Date and Time Values in SQL Server
How To Perform Comparison on Date and Time Values in SQL Server Transact-SQL? Comparison operations on date and time values can be performed in the same way as numeric values. The comparison rule is simple: a date and time value in the future has a greater value than a date and time value in the pas...
2017-01-21, 1724🔥, 0💬

"ALTER PROCEDURE" - Modifying Existing Stored Procedures in SQL Server
How To Modify an Existing Stored Procedure in SQL Server Transact-SQL? If you find a mistake in an existing stored procedure previously created, you can drop (delete) it and create it again correctly. But dropping a stored procedure may affect other database objects who are depending on this stored ...
2017-01-05, 1720🔥, 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, 1716🔥, 0💬

What Is a Statement in SQL Server Transact-SQL
What is a statement in SQL Server Transact-SQL? A statement in SQL Server Transact-SQL is a single smallest execution unit. Here are some examples of Transact-SQL statements: "PRINT 'Hello World!';" - An output statement that print a character string to the console. "SELECT GETDATE();" - A query sta...
2017-05-29, 1715🔥, 0💬

Date/Time Data Type Comparison in SQL Server Transact-SQL
What are differences between date and time data types in SQL Server Transact-SQL? I want to compare of date and time data types? Here is a comparison table of all date and time data types supported in SQL Server Transact-SQL: Data type Storage size Precision Default Format / (bytes) Value range ----...
2017-02-25, 1707🔥, 0💬

Date and Time Functions Supported by SQL Server 2005 in SQL Server
What Are the Date and Time Functions Supported by SQL Server 2005 in SQL Server Transact-SQL? SQL Server 2005 supports n character string functions: DATEADD(datepart, number, date) - Returning the same date and time value with one part added with the "number". DATEDIFF(datepart, startdate, enddate) ...
2017-02-20, 1705🔥, 0💬

SCROLL - Creating Cursors for Backward Scrolling in SQL Server
How To Create a Scrollable Cursor with the SCROLL Option in SQL Server Transact-SQL? SQL Server offers two scrolling option on cursors: 1. FORWARD_ONLY - The cursor can only be scrolled forward with "FETCH NEXT" statements. In another word, you can only loop through the cursor from the first row to ...
2016-10-17, 1703🔥, 0💬

Types of Data Literals in SQL Server Transact-SQL
What are different types of data literals supported in SQL Server Transact-SQL? There are 8 types of data literals supported in SQL Server Transact-SQL: 1. Integer Number Literals - Sequences of numbers prefixed with +/- sign if needed. Integer number literals are used to represent integer values. F...
2017-05-20, 1699🔥, 0💬

Unicode String Literals in SQL Server Transact-SQL
What are Unicode string literals supported in SQL Server Transact-SQL? Unicode string literals in Transact-SQL are sequences of characters enclosed in single quotes and prefixed with (N) as N'...'. String literals are used to provide values to string variables or table columns like NCHAR(40), NVARCH...
2017-05-05, 1691🔥, 0💬

Finding the Login Name Linked to a Given User Name in SQL Server
How To Find the Login Name Linked to a Given User Name in SQL Server? If you know a user name in a database and you want to find out which login name is linked this user name, you need to check the Security ID (SID) of the user name based on the following rules: Each login name is associated a uniqu...
2017-08-25, 1689🔥, 0💬

Passing Expressions to Function Parameters in SQL Server
Can You Pass Expressions to Function Parameters in SQL Server Transact-SQL? Can you pass expressions to stored procedure parameters? The answer is yes. When executing functions, input values can be written as expressions. But the resulting value data type must match the parameter. The tutorial exerc...
2016-12-18, 1688🔥, 0💬

COLLATE Clause in SQL Server Transact-SQL
How To Specify the Collation for a Character Data Type in SQL Server Transact-SQL? If you do not want to use the default collation provided by the SQL Server, you can use the "COLLATE collation_name" clause to specify a different collation to be used at different levels: Database Level - Used in CRE...
2017-05-13, 1687🔥, 0💬

SCHEMABINDING - Binding Views to Underlying Tables in SQL Server
How To Bind a View to the Schema of the Underlying Tables in SQL Server? By default, views are not bound to the schema of the underlying tables. This means that SQL Server will allow you to change underlying table's schema any time. For example, you can drop the underlying table while keep the view....
2016-11-03, 1674🔥, 0💬

What Is a Boolean Value in SQL Server
What Is a Boolean Value in SQL Server Transact-SQL? A Boolean value indicates a condition in a state of TRUE or FALSE. In Transact-SQL language, there is not storage data type defined to store a Boolean value. So Boolean values can only exist temporarily as part of the execution of Transact-SQL expr...
2017-01-29, 1671🔥, 0💬

Single-byte String Literals in SQL Server Transact-SQL
What are single-byte string literals supported in SQL Server Transact-SQL? Single-byte string literals in Transact-SQL are sequences of characters enclosed in single quotes. String literals are used to provide values to string variables or table columns like CHAR(40), VARCHAR(40), etc. String litera...
2017-05-20, 1667🔥, 0💬

Creating Triggers for INSERT Statements Only in SQL Server
How To Create a Trigger for INSERT Only in SQL Server? The trigger, dml_message, provided in previous tutorials was defined to handle all 3 types of DML statements, INSERT, UPDATE, and DELETE. If you do not want the trigger to handle all 3 types of DML statements, you can list only 1 or 2 of the sta...
2016-10-24, 1667🔥, 0💬

Comments in SQL Server Transact-SQL Statements
How to enter comments in SQL Server Transact-SQL statements? There are 2 ways to enter comments within Transact-SQL statements: Starting comments with two dashes "--": Everything between "--" and the end of the line is treated as a comment. Entering comments between "/*" and "*/": Everything between...
2017-05-29, 1664🔥, 0💬

Boolean Values and Logical Operations in SQL Server Transact-SQL
Where to find answers to frequently asked questions on Boolean Values and Logical Operations in SQL Server Transact-SQL? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Boolean Values and Logical Operations in SQL Server Transact-SQL. Clear answer...
2017-01-29, 1659🔥, 0💬

"@@FETCH_STATUS" - Looping through Result Set in SQL Server
How To Loop through the Result Set with @@FETCH_STATUS in SQL Server Transact-SQL? The FETCH statement only returns one row from the result set. If you want to return all rows, you need to put the FETCH statement in a loop. A simple way to stop the loop to check the system variable @@FETCH_STATUS, w...
2016-10-17, 1651🔥, 0💬

Database in Use When Renaming a Database in SQL Server
Why I am getting this error when renaming a database in SQL Server? If you are trying to rename a database that is in use, you will get an error message like this: "The database could not be exclusively locked to perform the operation." Before renaming a database, you must stop all client sessions u...
2016-11-20, 1645🔥, 0💬

Binary String Data Types in SQL Server Transact-SQL
What are binary string data types supported in SQL Server Transact-SQL? Binary string data types are used to hold binary character strings. There are 3 binary string data types supported in SQL Server Transact-SQL: 1. BINARY - Used to hold binary strings of a fixed length, specified in the format of...
2017-04-04, 1640🔥, 0💬

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