Related differences

Ques 31. How to run SQL Server 2005 Books Online on your local system?

SQL Server 2005 Books Online can be accessed by a Web browser over the Internet. But you can also download it and read it on your local system. If you have downloaded and installed SQL Server 2005 Books Online package, you follow this tutorial to run it:

1. Click Start > Programs > Microsoft SQL Server 2005 > Documentation and Tutorials > Tutorials > SQL Server Tutorials. The SQL Server 2005 Books Online window shows up.

2. Click the plus sign (+) next to "SQL Server 2005 Tutorials in the Contents window".

3. Click the plus sign (+) next to "SQL Server Tools Tutorials".

4. Click "Lesson 1: Basic Navigation in SQL Server Management Studio". The book content shows up for you to read.

Is it helpful? Add Comment View Comments
 

Ques 32. How to create new tables with "CREATE TABLE" statements in MS SQL Server?

If you want to create a new table, you can use the "CREATE TABLE" statement. The following tutorial script shows you how to create a table called "tip":

CREATE TABLE wb (id INTEGER PRIMARY KEY,
subject VARCHAR(80) NOT NULL,
description VARCHAR(256) NOT NULL,
create_date DATETIME NULL)
GO

This scripts creates a testing table called "wb" with 4 columns in the current database.

Is it helpful? Add Comment View Comments
 

Ques 33. How to use Transact-SQL statements to access the database engine?

Transact-SQL statements can be used to access the database engine directly. Here are some good tutorials provided by the SQL Server 2005 Books Online. See the SQL Server 2005 Tutorials > Database Engine Tutorials > Writing Transact-SQL Statements Tutorial section in the SQL Server 2005 Books Online document.

This SQL Questions Guide is intended for users who are new to writing SQL statements. It will help new users get started by reviewing some basic statements for creating tables and inserting data. This tutorial uses Transact-SQL, the Microsoft implementation of the SQL standard. This tutorial is intended as a brief introduction to the Transact-SQL language and not as a replacement for a Transact-SQL class. The statements in this tutorial are intentionally simple, and are not meant to represent the complexity found in a typical production database.

Is it helpful? Add Comment View Comments
 

Ques 34. How To Get a List of All Tables with "sys.tables" View in MS SQL Server?

If you want to see the table you have just created, you can use the "sys.tables" system view to get a list of all tables in the current database. The tutorial script gives you a good example:

SELECT name, type_desc, create_date FROM sys.tables
GO
name type_desc create_date
wb USER_TABLE 2007-05-19 23:05:43.700

The output shows that there is only one table in the current database.

Is it helpful? Add Comment View Comments
 

Ques 35. How to create new databases with "CREATE DATABASE" statements?

This is the first SQL Questions Guide of a quick lesson on creating database objects with Transact-SQL statements. This section shows you how to create a database, create a table in the database, and then access and change the data in the table. Because this is an introduction to using Transact-SQL, it does not use or describe the many options that are available for these statements. This SQL Questions Guide assumes that you are running SQL Server Management Studio Express.

Like many Transact-SQL statements, the CREATE DATABASE statement has a required parameter: the name of the database. CREATE DATABASE also has many optional parameters, such as the disk location where you want to put the database files. When you execute CREATE DATABASE without the optional parameters, SQL Server uses default values for many of these parameters. This tutorial uses very few of the optional syntax parameters.

To create a database - In a Query Editor window, type but do not execute the following code:

CREATE DATABASE YourDataBaseName
GO

Is it helpful? Add Comment View Comments
 

Most helpful rated by users: