SQL server usage Basics

Source: Internet
Author: User
Tags management studio sql server express

1. Install the free learning version of ms SQL Server express edition,

Google SQL Server 2005 express to Microsoft's official website for download. About 53 m.

Http://www.microsoft.com/downloads/zh-cn/details.aspx? Familyid = 220549b5-0b07-4448-8848-dcc21314b41

Select the language version.

2. Installation. If you do not want to install 2005 express after installation, You need to delete the old version from the Add/delete program.

Command to stop the service:

sc stop mssql$sqlexpress

Select SQL Server Authentication during installation, without Windows authentication.

3. Configuration

Open "Configuration Manager" and find it in the Start menu. You can see it in the protocol section.

The server can be accessed through the 4th method (in fact, it is also a common 4th Process Communication Technology, shared memory, named pipe, TCPIP network socket,)

The most common Server Client Communication Technology is TCPIP network.

So now we start to configure the TCPIP protocol.

Configure the port number. If no port is configured, the server will randomly use the port (for security reasons, it is not easy for hackers to scan the service port)

4. Remember to restart the server.

sc stop mssql$sqlexpress sc start mssql$sqlexpress

5. Check whether the port is correct.

netstat -ab | findstr /i sqlserver.exe

6 client Tool Test Link

You can test it with the command line.

telnet 127.0.0.1 1433

Access the database using graphical express management Studio Tools

Log on to the account using the SA account and the SQL server administrator. It is equivalent to the root account of MySQL.

After logging in, select the database you want to operate on, right-click an SQL query, and enter an SQL statement to operate the database.

SQL statement:

-- Create database mydb; -- use database -- use mydb; -- create data table -- Create Table T1 (C1 int not null primary key, C2 varchar (50 )); -- insert data -- insert into T1 (C1, C2) values (1, 'Hello'); -- modify data -- Update T1 set C1 = 2; -- query data -- select * from T1; -- delete data -- delete from T1 where c1 = 1; -- delete a data table -- drop table T1; -- delete a database -- drop database mydb;

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.