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

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

Casting Strings to Wrong Code Pages in SQL Server Transact-SQL
What Happens If Strings Are Casted into Wrong Code Pages in SQL Server Transact-SQL? In SQL Server, different collations may use different code pages. For example: Albanian_CI_AI_KS_WS - Albanian, Code page 1250. Arabic_CI_AS_KS_WS - Arabic, Code page 1256. French_CI_AI - French, Code page 1252. Kor...
2017-05-13, 2324🔥, 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, 2322🔥, 0💬

Constant or Data Literal in SQL Server Transact-SQL
What Is a Constant or Literal in SQL Server Transact-SQL? A constant, or data literal, is a symbolic expression that represents a specific value of a specific data type in SQL Server Transact-SQL. Constants or literals are used commonly as the default values for table columns, variables, and paramet...
2017-05-20, 2310🔥, 0💬

"FULL OUTER JOIN ... ON" - Writing Queries with Full Outer Joins in SQL Server
How To Write a Query with a Full Outer Join in SQL Server? If you want to query from two tables with a full outer join, you can use the FULL OUTER JOIN ... ON clause in the FROM clause. The following query returns output with a full outer join from two tables: fyi_links and fyi_rates. The join condi...
2016-10-29, 2310🔥, 0💬

Overflow Errors with INT Values in SQL Server Transact-SQL
What Happens If an Integer Is Too Big for INT (INTEGER) Date Type in SQL Server Transact-SQL? If you are entering an INT data type literal with representing an integer value too big for INT data type to store, the SQL Server will give you an arithmetic overflow error. The same error will happen on B...
2017-04-19, 2295🔥, 0💬

Suser_Sname() - Sever Level Security Principal of Your Session in SQL Server
What Is the Security Principal at the Server Level That Represents Your Session in SQL Server? Security principal identifies who you are when you interact with the SQL Server. What can do you at the server level solely depends on the security principal that represents you. So it is very important to...
2016-10-20, 2257🔥, 0💬

"sp_rename ... 'OBJECT'" - Renaming Existing Tables in SQL Server
How to rename an existing table with the "sp_rename" stored procedure in SQL Server? If you have an existing table and you want to change the table name, you can use the "sp_rename ... 'OBJECT'" stored procedure. "sp_rename" allows you to change names of COLUMN, DATABASE, INDEX, USERDATATYPE, and OB...
2016-11-15, 2255🔥, 0💬

sys.schemas - Listing All Schemas in a Database in SQL Server
How To List All Schemas in a Database in SQL Server? If you want see all existing schemas in the current database, you can use view sys.schemas as shown in the example below: USE FyiCenterData; GO SELECT * FROM sys.schemas; GO name schema_id principal_id -------------------- ----------- ------------...
2016-10-22, 2253🔥, 0💬

sys.trigger_events - Event List of an Existing Trigger in SQL Server
How To See the Event List of an Existing Trigger using sys.trigger_events in SQL Server? If what are the DML events an existing trigger is handling, you can use the catalog view, sys.trigger_events. You need to join sys.trigger_events and sys.triggers to get a better list as shown in this tutorial e...
2016-10-24, 2218🔥, 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, 2205🔥, 0💬

What Is SQL Language
What Is SQL Language? SQL, SEQUEL (Structured English Query Language), is a language for RDBMS (Relational Database Management Systems). During the 1970s, a group at IBM's San Jose research center developed a database system "System R" based upon Codd's model. Structured English Query Language ("SEQ...
2017-06-16, 2199🔥, 0💬

What Are Logical/Boolean Operations in SQL Server
What Are Logical/Boolean Operations in SQL Server Transact-SQL? Logical (Boolean) operations are performed on Boolean values with logical operators like 'AND', 'OR', or 'NOT'. Logical operations return Boolean values. SQL Server 2005 supports the following logical operations: AND - Returns TRUE if b...
2017-01-11, 2196🔥, 0💬

Running Queries with 'sqlcmd' Tool in SQL Server
How to run Queries with "sqlcmd" tool in SQL Server? "sqlcmd" is a client tool that you can use to interact SQL server. You can follow the tutorial below to run queries on the local SQL Server 2005 Express. 1. Open a command window and enter the following command to start "sqlcmd" and run a simple q...
2016-12-04, 2180🔥, 0💬

"DECLARE ... CURSOR" - Declaring Cursor Objects in SQL Server
How To Declare a Cursor with "DECLARE ... CURSOR" in SQL Server Transact-SQL? If you want to use a cursor to represent the result set of a query, you need to define a cursor name with a SELECT sub-statement using the "DECLARE ... CURSOR" statement using the following syntax format: DECLARE cursor_na...
2016-10-17, 2163🔥, 0💬

Overflow and Rounding on NUMERIC Values in SQL Server Transact-SQL
How Extra Digits Are Handled with NUMERIC Data Type Literals in SQL Server Transact-SQL? Exact numeric data types defined with NUMERIC(p,s) has two limits defined by two parameters: p (precision) and s (scale): Maximum number of digits of the integer part (digits before the decimal point) is defined...
2017-04-19, 2157🔥, 0💬

"sys.columns" - Getting a List of Columns in a View in SQL Server
How To Get a List of Columns in a View using "sys.columns" in SQL Server? If you have an existing view, but you don't remember what are the columns defined in the view, you can use the "sys.columns" system view to get a list of all columns of all views in the current database. In order to a list of ...
2016-11-05, 2153🔥, 0💬

"ALTER TABLE ... DROP COLUMN" - Deleting Existing Columns in SQL Server
How To Delete an Existing Column in a Table with "ALTER TABLE ... DROP COLUMN" in SQL Server? If you have an existing column in a table and you do not need that column any more, you can delete it with "ALTER TABLE ... DROP COLUMN" statement. Here is a tutorial script to delete an existing column: AL...
2016-11-17, 2136🔥, 0💬

User_Name() - Database Level Security Principal of Your Session in SQL Server
What Is the Security Principal at the Database Level That Represents Your Session in SQL Server? Security principal identifies who you are when you interact with the SQL Server. What can do you at the database solely depends on the security principal that represents you. So it is very important to k...
2016-10-20, 2133🔥, 0💬

Verifying SQL Server Running Status in SQL Server
How do you know if SQL Server is running on your local system in SQL Server? After installing SQL Server 2006 Express Edition, it will be running on your local system quietly as a background process. If you want to see this process is running, run Windows Task Manager. You should see a process calle...
2016-12-08, 2128🔥, 0💬

General Questions on Microsoft SQL Server Transact-SQL
Where to find answers to frequently asked questions in general areas of Microsoft SQL Server Transact-SQL? I am new to Transact-SQL. Here is a list of frequently asked questions and their answers compiled by FYIcenter.com team in general areas of Microsoft SQL Server Transact-SQL: What Is SQL Langua...
2017-06-16, 2127🔥, 0💬

Incrementing or Decrementing Parts of DATETIME Values in SQL Server
How To Increment or Decrement Parts of DATETIME Values in SQL Server Transact-SQL? If you want to increment or decrement one part of a date and time value, you can use the DATEADD() function in the following format: DATEADD(datepart, number, date) returns DATETIME: "date" - the input date "number" -...
2017-02-20, 2119🔥, 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, 2113🔥, 0💬

"sp_rename ... 'COLUMN'" - Renaming an Existing Column in SQL Server
How to rename an existing column with the "sp_rename" stored procedure in SQL Server? If you have an existing column in a table and you want to change the column name, you can use the "sp_rename ... 'COLUMN'" stored procedure. "sp_rename" allows you to change names of COLUMN, DATABASE, INDEX, USERDA...
2016-11-17, 2112🔥, 0💬

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