Text detailed SQL Server 2008r2 use tutorial _mssql2008

Source: Internet
Author: User

This article has shared the SQL Server 2008r2 simple use tutorial, for everybody reference, the concrete content is as follows

1 First find the relevant content in the Start menu, the following figure: The installed components may vary, and my computer includes the following items;

Business intelligence; management console; Import and export data; Analysis Services; Integration services; configuration tools; documents and tutorials; performance tools;

Because of the number of components I installed;


2 access to the management console

First, log on; server type select Database engine; Here you can log on with Windows authentication first;


3 access to the management console

The interface is as follows; see the database has four subkeys, system database, database snapshots, ReportServer, reportservertempdb; because I installed the Microsoft Report Server, so there are reportserver items;

The first level entry for the left tree view is: Database, security, server objects, replication, management, SQL Server Agent;


4 Right click on the database, pop-up the following menu;

Includes the following submenu: New database, append, restore database, restore files and filegroups, start PowerShell, report, refresh;


5 Select New Database

Enter the name of the database; The data base of the transmission management Information system is established here, named Shudiansuo;

You can set the path of the database file and log file, or you can default;

The database file belongs to the primary filegroup by default, and the initial size of both files defaults to 3 and 1MB;


6 Click to view the connection properties at the bottom left of the image, and see the current connection properties;

Attributes are divided into four groups: product; server environment; connection; authentication;


7 Right click on "table", pop-up as follows;

Includes five items: new table; filter; start PowerShell; report; refresh;


8 and 9

Enter the column name and data type in the pop-up interface;

Right-click at the beginning of the line, pop-up below;


Include: Set primary key; Insert column; Delete column; relationship; index/key; Full-text index; XML index; CHECK constraint; spatial index; Generate change script;

Select the first item, set the first column as the primary key, and complete the following figure;


For a description of the field type in the figure above:

Char: fixed length, storing ANSI character, insufficient to complement English half-width spaces.
NCHAR: fixed length, storing Unicode characters, insufficient to complement English half-width spaces
VARCHAR: variable length, storage ANSI character, automatically varies according to data length.
NVARCHAR: variable length, storing Unicode characters, automatically changing according to data length.
bigint
Integer data from -2^63 (-9223372036854775808) to 2^63-1 (9223372036854775807)
(all numbers). The storage size is 8 bytes.
Int
Integer data (all numbers) from -2^31 (-2,147,483,648) to 2^31-1 (2,147,483,647).
The storage size is 4 bytes. The SQL-92 synonym for int is integer.
smallint
Integer data from -2^15 (-32,768) to 2^15-1 (32,767). The storage size is 2 bytes.
tinyint
Integer data from 0 to 255. The storage size is 1 bytes.

Because the voltage level will not exceed 255, so its ID takes tinyint type;

10 Right Click in the following figure, pop-up menu below;

Include the following submenu items: Save, close, all except close, copy full path, open folder;


11 Select Save; Enter table name;


12 Right-click on the name of the new table and pop up the following menu;

Included submenus: Create a new table, design, select the first 1000 lines, edit the first 200 lines, write table scripts for, view dependencies, full-text indexing, storage, strategy, aspects, start PowerShell, report;


13 Select the first 200 lines of editing, start data entry;


A new query on the 14 click Tool bar;


15 in the New Query window, enter the following SQL statement, click Execute;

The input data is queried, as shown below;

Note: On the left, the Drop-down list in the sidebar, to select the database to operate, here is Shudiansuo;


Wonderful topic Sharing: SQL Server Installation Tutorial manual

The above is the entire content of this article, I hope to help you learn, but also hope that we support the cloud habitat community.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.