infuerno.github.io

Apress Beginning T-SQL 2012

Chapter 1 Getting Started

F7 to open the Object Browser in the right hand side of SSMS

Indexes

:Clustered Index Only 1 per table, the table is literally ordered using the index, using pages. New items are added to the correct ‘page’. Analogous to a phonebook being order by surname, forename.

:Non-clustered Index Up to 999 per table. An index maintained seperately to the table which has pointers to data in the table. Every time a new entry is added, any non-clustered indexes potentially need to be updated.

Schemas

Schemas are used to organise tables and objects within the database. Each user has a default schema and can refer to objects within this schema without qualification. Users can also own schemas (but not individual objects). References to objects in schemas other than the user’s default must be qualified with the schema name.

Chapter 2 Writing Simple SELECT Queries

Selecting

Filtering