term1 Definition1term2 Definition2term3 Definition3
Please sign in to your Google account to access your documents:
Define: Base Table
In SQL Server, tables containing data are often called base tables
Name 5 types of table variations
Temporary TablesTable variablesViewsIndexed ViewsDerived tables / Table Expressions
Define: Temporary Table
Temporary tables are base tables that exist in tempdb and last only as long as a session or scope referencing them endures.
Define: Table Variable
Table variables are variables that can store data but only for the duration of a T-SQL batch
Define: View
Views, which are not base tables but are derived from queries against base tables, appear just like tables but do not store data
Define: Indexed Views
Indexed views store data but are defined as views and are updated whenever the base tables are updated
Define: Derived Tables & Table Expressions
Derived tables and table expressions are subqueries that are referenced like tables in queries
Name two ways a table can be created in T-SQL
By using the CREATE TABLE statement, where you explicitly define the components of the table.By using the SELECT INTO statement, which creates a table automatically by using the output of a query for the basic table definition
Syntax: Write or type out the minimum required code to create a table using T-SQL
Create table db_name.schema_name.table_name ( column_name column_data_type );go
When creating a table, what MUST you specify?
The table nameThe table columns, including: Column names Column data types
Need help typing ? See our FAQ (opens in new window)
Please sign in to create this set. We'll bring you back here when you are done.
Discard Changes Sign in
Please sign in to add to folders.
Sign in
Don't have an account? Sign Up »
You have created 2 folders. Please upgrade to Cram Premium to create hundreds of folders!