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

What Are Views in SQL Server
What Are Views in SQL Server? A view is a database object that represents the data in one or more tables in the same structure as a separate table. Here are some basic rules about views: Tables store real data. Views do not store real data. Views must have underlying tables to provide data. Each vie...
2016-11-08, 1367🔥, 0💬

Rebuilding All Indexes on One Table in SQL Server
How To Rebuild All Indexes on a Single Table in SQL Server? If you have several indexes on a single table and want to rebuild all of them, you may use the "ALTER INDEX ALL ON table_name REBUILD" statement as shown in the tutorial exercise below: USE FyiCenterData; GO UPDATE fyi_links_indexed SET url...
2016-11-08, 1329🔥, 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, 3064🔥, 0💬

CREATE VIEW - Creating a View on an Existing Table in SQL Server
How To Create a View on an Existing Table in SQL Server? If you want to a view on an existing table, you can use the CREATE VIEW statement in a simple syntax: CREATE VIEW view_name AS SELECT ... The tutorial exercise below shows you how to create a view to represent sub set of data stored in fyi_lin...
2016-11-05, 2447🔥, 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, 2363🔥, 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, 2171🔥, 0💬

"sp_columns" - Getting a List of Columns in a View in SQL Server
How To Get a List of Columns in a View 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 view, you can use the "sp_columns" stored procedure to get a list of all columns of the specified view. The followin...
2016-11-05, 2131🔥, 0💬

sys.views - List of Existing Views in SQL Server
How To See Existing Views in SQL Server? If you want to know how many views you have created in a database, you use the system view called sys.views to get a list of views defined in the current database. The tutorial exercise shows you how many views in database FyiCenterData: USE FyiCenterData; GO...
2016-11-05, 2026🔥, 0💬

sys.sql_modules - Getting View Definitions Back in SQL Server
How To Get the Definition of a View Out of the SQL Server in SQL Server? If you want get the definition of an existing view back from the SQL Server, you can use the system view called sys.sql_modules, which stores definitions of views and procedures. The sys.sql_modules holds view definitions ident...
2016-11-05, 2014🔥, 0💬

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

Creating a View with Data from Another View in SQL Server
Can You Create a View using Data from Another View in SQL Server? Can You Create a View with Data from Another View? The answer is yes. A view can be used as a table to build other views. The tutorial exercise below shows you how to create a view using data from another view: USE AdventureWorksLT; G...
2016-11-05, 1407🔥, 0💬

DROP VIEW - Deleting Existing Views in SQL Server
How To Drop Existing Views from a Database in SQL Server? If you don't need a specific view any more, you can use the DROP VIEW statement to delete it from the database. The following tutorial exercise shows you how to delete the view, fyi_links_view: USE FyiCenterData; GO SELECT * FROM sys.views; G...
2016-11-05, 1296🔥, 0💬

Using ORDER BY to Define a View in SQL Server
Can You Use ORDER BY When Defining a View in SQL Server? Sometimes you want the data in a view to be sorted and try to use the ORDER BY clause in the SELECT statement to define the view. But SQL Server will not allow you to use ORDER BY to define a view without the TOP clause. The tutorial exercise ...
2016-11-04, 1626🔥, 0💬

ALTER VIEW - Modifying Existing Views in SQL Server
How To Modify the Underlying Query of an Existing View in SQL Server? If you have an existing view, and want to change the underlying SELECT statement, you can use the "ALTER VIEW ..." statement to redefine the view. The tutorial exercise below shows you how modify an existing view: USE FyiCenterDat...
2016-11-04, 1501🔥, 0💬

Updating Data in a View in SQL Server
Can You Update Data in a View in SQL Server? Can you update data in a view? The answer is no. But if the question is "Can you update data in the underlying table through view?" The answer is then yes. SQL Server will allow you to update data in the underlying table through a view. The tutorial exerc...
2016-11-04, 1471🔥, 0💬

Deleting a Table That Is Used by a View in SQL Server
What Happens If You Delete a Table That Is Used by a View in SQL Server? Assuming that you have a table which is used by a view, and you try to delete that table. SQL Server will let you delete the table without any trouble. But that view will become invalid. The tutorial exercise below shows you wh...
2016-11-04, 1432🔥, 0💬

Inserting Data into a View in SQL Server
Can You Insert Data into a View in SQL Server? Can you insert data into a view? The answer is no. But if the question is "Can you insert data into the underlying table through view?" The answer is then yes. SQL Server will allow you to insert data into the underlying table through a view with a cond...
2016-11-04, 1290🔥, 0💬

Using INSERT, UPDATE and DELETE Statements in SQL Server
Where to find answers to frequently asked questions on Using INSERT, UPDATE and DELETE Statements in SQL Server? Here is a list of frequently asked questions and their answers compiled by FYIcenter.com DBA team on Using INSERT, UPDATE and DELETE Statements in SQL Server. Clear answers are provided w...
2016-11-03, 2742🔥, 0💬

DML (Data Manipulation Language_Statements in SQL Server
What Are DML (Data Manipulation Language) Statements in SQL Server? DML (Data Manipulation Language) statements are statements to change data values in database tables. The are 3 primary DML statements: INSERT - Inserting new rows into database tables. For example "INSERT INTO fyi_links VALUES (101,...
2016-11-03, 1962🔥, 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, 1682🔥, 0💬

Assigning New Column Names in a View in SQL Server
How To Assign New Column Names in a View in SQL Server? By default, column names in a view are provided by the underlying SELECT statement. But sometimes, the underlying SELECT statement can not provide names for output columns that specified as expressions with functions and operations. In this cas...
2016-11-03, 1639🔥, 0💬

Testing Table for DML Statements in SQL Server
How To Create a Testing Table with Test Data in SQL Server? If you want to practice DML statements, like INSERT, UPDATE and DELETE statements, you should create a testing table. The tutorial exercise shows you a good example: CREATE TABLE fyi_links (id INTEGER PRIMARY KEY, url VARCHAR(80) NOT NULL, ...
2016-11-03, 1633🔥, 0💬

"INSERT INTO" - Inserting a New Row into a Table in SQL Server
How To Insert a New Row into a Table with "INSERT INTO" Statements in SQL Server? To insert a new row into a table, you can use the INSERT INTO statement with values specified for all columns as in the following syntax: INSERT INTO table_name VALUES (list_of_values_of_all columns) Note that the list...
2016-11-03, 1495🔥, 0💬

DEFAULT - Using Column Default Values in INSERT Statements in SQL Server
How To Use Column Default Values in INSERT Statements in SQL Server? If a column is defined with a default value in a table, you can use the key word DEFAULT in the INSERT statement to take the default value for that column. The following tutorial exercise gives a good example: INSERT INTO fyi_links...
2016-11-03, 1494🔥, 0💬

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