Home > SQL and SQL Server Tutorial and Reference Guide
Learning Guide:
EMAIL THIS

SQL and SQL Server Tutorial and Reference Guide

31 Jul 2008 | SearchSQLServer.com

Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   

SQL (Structured Query Language) is the language of databases. This "Back to Basics" SQL tutorial provides a great starting point and foundation for learning SQL or brushing up your skills.

This SQL Server tutorial will continue to be updated with content from SQL Server guru Denny Cherry, so please bookmark this page and return for regular updates.

SQL Tutorial and Reference
To start learning SQL Server basics, simply click a link below to jump to a section.

  → The four basic SQL statements
  → SQL and SQL Server tutorials
  → Visit the SQL Server with Mr. Denny blog

   What is IT Knowledge Exchange?
IT Knowledge Exchange (ITKE) is a community of IT pros that share and pool their knowledge. You can ask your own IT question or share your expertise by answering a question. Do you have an IT problem that's driving you crazy? Come ask your peers and colleagues on IT Knowledge Exchange. You can even start your own blog and earn some cash for posting regularly.

  → Visit the ITKE Community Blog to learn how to get IT answers

  ↓ The Four Basic SQL Statements Table of Contents   

The SELECT statement
There are four basic commands in databases; SELECT, INSERT, UPDATE and DELETE. The most important of these is probably the SELECT statement, which is used to retrieve and display the data from the database.

The INSERT statement
While the SELECT statement is arguably the most important command, the INSERT comes in a close second. The INSERT statement is used to do exactly what it sounds like, this command inserts data into a database table.

The UPDATE statement
After data has been inserted into a table, you will at some point wish to update that data.This is done by using the UPDATE statement. The UPDATE statement can update a record or a set of records in a database table.

The DELETE statement
The DELETE statement is used when you wish to remove data from a table. Using the DELETE statement without a WHERE clause will remove all the data from your table. The WHERE clause works the same way as the WHERE clause for SELECT and UPDATE statements.

  ↓ SQL and SQL Server Tutorials Table of Contents   

SQL Server Tables
Tables are the core of any database platform. Without SQL Server tables, there would be no way to store the data that we process. On the surface, tables may look similar to the rows and columns of a spreadsheet but they are very different.

CTE (Common Table Expressions)
One of the new features introduced in SQL Server 2005 was CTE (Common Table Expressions). In their simplest, most common form, you can think of them as a temporary, single use view.

SQL Server Views
Views are strange objects. They look like tables, can be queried like tables, but SQL Server Views don't store any actual data. Think of them as a virtual table which points to the source tables. Views can combine data from one or more tables via JOIN, just like a SELECT statement.

SQL Filters: JOIN vs. EXISTS vs. IN
Not all filters are the same. You can learn about filters in this comparison of JOIN vs. EXISTS vs. IN. Different filtering operations are used at different times to get the best performance out of your SQL Server.

SQL Server Endpoints
People, and applications, connect to SQL Server by way of endpoints. There are four different types of SQL Server endpoints; SERVICE_BROKER, DATABASE_MIRRORING, SOAP and TSQL.

Logins and Users
You'll sometimes see the terms Logins and Users used interchangeably. However, in Microsoft SQL Server, they are two very different things. Because everyone assumes that they are the same thing, it can get a little confusing.

The sp_change_users_login procedure
The specific purpose of the sp_change_users_login procedure is to identify and correct the users within a database that do not have corresponding logins.

SQL Functions
SQL functions create little blocks of code. Functions are fantastic for converting data from one format to another or for looking up other values based on a lookup. However, this comes at a price. That price is CPU power.

SQL Stored Procedures
Stored procedures are extremely useful objects. Not only do they store T/SQL scripts for later execution, but stored procedures also provide an extremely important security barrier between the user interface and the database.

SQL Server Memory Settings
Tweaking the memory settings just right in 32-bit versions of SQL Server can be tricky. Here's how to configure the memory setting in SQL Server.

The BACKUP DATABASE command
The BACKUP DATABASE command takes backups of the database, along with all tables, views, procedures and functions. This secures your information in case of a server failure or accidental data deletion.

The RESTORE DATABASE command
The RESTORE DATABASE command is what is used to recover a database which has been backed up using the BACKUP DATABASE command. The syntax of this command is very similar to the BACKUP DATABASE command in many respects..

   GOT IT QUESTIONS? YOUR PEERS HAVE ANSWERS
Your peers and colleagues have faced the same or similar problems.
So ask your own question on the IT Knowledge Exchange community.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
SQL/Transact SQL (T-SQL)
SQL language crash course (just enough to be dangerous)
Working with IntelliSense in SQL Server 2008 Management Studio
SQL Server Mailbag: Stored procedures, triggers and SSRS reports
Working with sparse columns in SQL Server 2008
Determining the source of full transaction logs in SQL Server
New GROUP BY option provides better data control in SQL Server 2008
Using the OPENROWSET function in SQL Server
Loading data files with SQL Server's BULK INSERT statement
Importing and exporting bulk data with SQL Server's bcp utility
Testing transaction log autogrowth behavior in SQL Server
SQL/Transact SQL (T-SQL) Research

SQL Server Stored Procedures
SQL Server Mailbag: CALs, witnesses and unwanted changes
SQL Server Mailbag: Stored procedures, triggers and SSRS reports
Top tips and tricks for SQL Server database development
Top 10 SQL Server development tips of 2008
SQL Server trigger vs. stored procedure to receive data notification
SQL Server errors, failures and other problems fixed from the trenches
SQL Server and data manipulation in T-SQL
How to use SQL Server 2008 hierarchyid data type
SQL Server stored procedures tutorial: Write, tune and get examples
Check SQL Server database and log file size with this stored procedure

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
ACID  (SearchSQLServer.com)
Collaboration Data Objects  (SearchSQLServer.com)
commit  (SearchSQLServer.com)
container  (SearchSQLServer.com)
DAO  (SearchSQLServer.com)
fetch  (SearchSQLServer.com)
OLE DB  (SearchSQLServer.com)
query  (SearchSQLServer.com)
SQL  (SearchSQLServer.com)
T-SQL  (SearchSQLServer.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary




Secure SQL - Data Security for Your Database
HomeNewsTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersIT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 2005 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts