<< < 10 11 12 13 14 15 16 17 18 19 20 > >>   ∑:509  Sort:Rank

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

"sys.columns" - Getting a List of Columns in a Table in SQL Server
How To Get a List of Columns using the "sys.columns" View in SQL Server? If you have an existing table, but you don't remember what are the columns defined in the table, you can use the "sys.columns" system view to get a list of all columns of all tables in the current database. In order to a list o...
2016-11-17, 2324🔥, 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, 2319🔥, 0💬

"SELECT ... INTO" - Creating New Tables With Queries in SQL Server
How to create new tables with "SELECT ... INTO" statements in SQL Server? Let's say you have a table with many data rows, now you want to create a backup copy of this table of all rows or a subset of them, you can use the "SELECT ... INTO" statement. The tutorial script below gives you a good exampl...
2016-11-17, 2252🔥, 0💬

"sp_help" - Getting a List of Columns in a Table in SQL Server
How To Get a List of Columns using the "sp_help" Stored Procedure in SQL Server? Another way to get a list of columns from a table is to use the "sp_help" stored procedure. "sp_help" returns more than just a list of columns. It returns: the table information, the column information, the identity col...
2016-11-17, 2161🔥, 0💬

"ALTER TABLE ... ADD" - Adding New Columns to Existing Tables in SQL Server
How To Add a New Column to an Existing Table with "ALTER TABLE ... ADD" in SQL Server? If you have an existing table with existing data rows, and want to add a new column to that table, you can use the "ALTER TABLE ... ADD" statement. The tutorial script below shows you a good example: ALTER TABLE t...
2016-11-17, 2085🔥, 0💬

"sp_columns" - Getting a List of Columns in a Table in SQL Server
How To Get a List of Columns using the "sp_columns" Stored Procedure in SQL Server? If you have an existing table, but you don't remember what are the columns defined in the table, you can use the "sp_columns" stored procedure to get a list of all columns of the specified table. The following tutori...
2016-11-17, 1821🔥, 0💬

"ALTER TABLE ... ALTER COLUMN" - Changing Column Data Type in SQL Server
How to change the data type of an existing column with "ALTER TABLE" statements in SQL Server? Sometimes, you may need to change the data type of an existing column. For example, you want increase the string length of a column. You can use the "ALTER TABLE ... ALTER COLUMN" statements in the followi...
2016-11-15, 3311🔥, 0💬

What Are Indexes in SQL Server
What Are Indexes in SQL Server? An index is a secondary database object associated with a table to improve the retrieval performance of rows from that table. An index can be defined for a single column or multiple columns of a given table. If an index is defined on a single column of a table, the in...
2016-11-15, 2814🔥, 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, 2483🔥, 0💬

sys.indexes - Viewing Existing Indexes on an Given Table in SQL Server
How To View Existing Indexes on an Given Table using sys.indexes in SQL Server? Another way to view existing indexes defined for a given table is to use the system view called "sys.indexes". The tutorial exercise shows you how many indexes were defined from the previous tutorial on table "fyi_links"...
2016-11-15, 2202🔥, 0💬

Understanding and Managing Indexes in SQL Server
Where to find answers to frequently asked questions on Understanding and Managing Indexes in SQL Server? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Understanding and Managing Indexes in SQL Server. Clear answers are provided with tutorial exe...
2016-11-15, 1799🔥, 0💬

Renaming an Existing Column with Management Studio in SQL Server
How to rename an existing column with SQL Server Management Studio in SQL Server? If you are using SQL Server Management Studio, you can rename almost any data objects through the Object Explorer window. The tutorial example below shows you how to rename a column: 1. Run SQL Server Management Studio...
2016-11-15, 1662🔥, 0💬

SP_HELP - Viewing Existing Indexes on an Given Table in SQL Server
How To View Existing Indexes on an Given Table using SP_HELP in SQL Server? If you want to know how many indexes have been defined for a given table, you can use the SP_HELP built-in stored procedure in the following syntax: EXEC SP_HELP table_name -- Returns all database objects related the given t...
2016-11-15, 1661🔥, 0💬

CREATE INDEX - Adding an Index on an Existing Table in SQL Server
How To Create an Index on an Existing Table in SQL Server? If you want to an index on an existing table, you can use the CREATE INDEX statement in a simple syntax: CREATE INDEX index_name ON table_name (column_name) The tutorial exercise below shows you how to add an index for the "in" column of the...
2016-11-15, 1579🔥, 0💬

"DROP TABLE" - Deleting Existing Tables in SQL Server
How To Drop an Existing Table with "DROP TABLE" Statements in SQL Server? If you want to delete an existing table and its data rows, you can use the "DROP TABLE" statement as shown in the tutorial script below: SELECT * FROM tipBackup GO id subject description create_date 1 Learn SQL Visit dev.fyice...
2016-11-15, 1513🔥, 0💬

DROP INDEX - Removing Existing Indexes in SQL Server
How To Drop Existing Indexes in SQL Server? For some reason, if you want remove an existing index, you can use the DROP INDEX statement with following syntax: CREATE INDEX table_name.index_name The tutorial exercise below shows you how to remove the index "fyi_links_id": USE FyiCenterData; GO SELECT...
2016-11-15, 1504🔥, 0💬

Measuring Performance of INSERT Statements in SQL Server
How To Measure Performance of INSERT Statements in SQL Server? When indexes are defined for a table, each time a new row is inserted to the table, all the indexes must be updated. This extra update work could slow down the insert statement. To find out how much slower the INSERT statements will be o...
2016-11-13, 2658🔥, 0💬

Creating a Large Table with Random Data for Indexes in SQL Server
How To Create a Large Table with Random Data for Index Testing in SQL Server? If you want to see how index can be used to improve data search performance, you have to build some large tables, which requires large amount of random data. This tutorial exercise helps you to build a large table with pur...
2016-11-13, 2297🔥, 0💬

Index Slowing Down INSERT Statements in SQL Server
Does Index Slows Down INSERT Statements in SQL Server? If you want to see the impact of indexes on INSERT statements, you can repeat the same insert script on the table "fyi_links" of the same structure with two indexes: one non-clustered index on column "url" and one non-clustered index on column "...
2016-11-13, 1783🔥, 0💬

Difference Between Clustered and Non-Clustered Indexes in SQL Server
What Is the Difference Between Clustered and Non-Clustered Indexes in SQL Server? SQL Server 2005 supports two types of indexes: clustered index and non-clustered index. Here are the main differences between them: One table can only have only one clustered index. One table can only have many non-clu...
2016-11-13, 1702🔥, 0💬

Index Speeding Up SELECT Statements in SQL Server
Does Index Speed Up SELECT Statements in SQL Server? If you want to see the impact of indexes on SELECT statements, you can run the same SELECT statement on "fyi_links" and "fyi_links_indexed" tables. See the tutorial exercise below: USE FyiCenterData; GO -- Run SELECT on the table without indexes D...
2016-11-13, 1689🔥, 0💬

CREATE CLUSTERED INDEX - Adding Clustered Indexes in SQL Server
How To Create a Clustered Index in SQL Server? If there is no primary key in a table, you can add one clustered index to that table with CREATE CLUSTERED INDEX statement. The tutorial exercise below shows you how to create a clustered index: USE FyiCenterData; GO -- Drop the old table, if needed DRO...
2016-11-13, 1667🔥, 0💬

Creating an Index for Multiple Columns in SQL Server
How To Create an Index for Multiple Columns in SQL Server? An index for multiple columns works similarly to a sorting process on multiple columns. If an index is defined for two columns, the index key is composed by values from those two columns. A multi-column index will be used to speed up the sea...
2016-11-13, 1614🔥, 0💬

<< < 10 11 12 13 14 15 16 17 18 19 20 > >>   ∑:509  Sort:Rank