Simple Introduction to SQL Server

Source: Internet
Author: User

SQL Server's simple introduction to SQL Server versions is divided into:

① Enterprise Edition: Comprehensive

② Standard Edition: Suitable for SME needs

③ Workgroup Edition: The ideal data management solution for small businesses with unlimited size and number of users

④ Development: Covers all features of the Enterprise Edition, but only allows development and testing to be used, not allowed as a production system

⑤ free version:

SQL Server usage: connecting to a Database

A) Check whether the service is turned on:

Method One: Microsoft...à Configuration tool àsqlserver Configuration Manager à (left) SQL Server service Mssqlsepver or sqlexpress any connection to a

Method Two: Win+ràservices.mscà find Mssqlsepver or sqlexpress in any connection to a

b) Select login mode

Method One: Windows Authentication login

Server type: Database engine

Server Name: (Startup is SQLExpress). or the computer name or localhost.

(starting with Mssqlsepver). \SQLExpress or computer name \SQLExpress

Method Two: Login à login name: saà general à self-resetting password à ok ... à security à

See how SQL Server is validated

          To set a constraint:

① Verify Length: Len (column name) >6

② value: Column name = ' value '

③ contains the value: Charindex (' value to include ', column name) >0

④ default value is today: getdate ()

Special judgment

① judgment null: IS NULL

Type conversions

Cast ()

Conver ()

Exporting data

Database right-click Task à export data

SQL statements

Query first few columns: SELECT Top 5 * from table name

Stored Procedures

Write stored procedure: create proc stored procedure name [parameter type [= Default] [Output]]

Call stored procedure: Execute (EXEC) stored procedure name [parameter value]

Delete stored procedure: drop proc Stored procedure name

Code Usage Database
    1. Java language:

① defining the connection string:

String con = "Data Source = server name; Initial catalog= database name; User id= users; pwd= Password "

② Creating Connection objects

SqlConnection conn = new SqlConnection (con);

③ Open the connection to the database:

Conn.Open ();

④ manipulate the database and close the connection:

Conn.close ();

Simple Introduction to SQL Server

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.