Because I love self-study, so from the zero basis of self-study SQL SERVER is also learning on 3WSCHOOL, content synchronization 3WSCHOO content, also equivalent to their own review it!!!
From the beginning of the minimalist:
Database: What is a database??
A: A database is usually made up of one or more tables, and each table has its own identity (for example, a customer order table, a commodity table, and so on), and the list contains multiple records, which is what we call a row.
The following example is a table named ' persons '
| Id |
Lastname |
FirstName |
Address |
City |
| 1 |
Adams |
John |
Oxford Street |
London |
| 2 |
Bush |
George |
Fifth Avenue |
New York |
| 3 |
Carter |
Thomas |
Changan Street |
Beijing |
The table above contains three records (one for each record) and has five columns: ID, last name, first name, address, city.
So if I just want to select the data for the LastName column, the statement looks like this:
Select Lastname from persons result set such as:
| Lastname |
| Adams |
| Bush |
| Carter |
Important: It's not case-sensitive in SQL
The semicolon inside the SQL statement?
The only thing I know about the Sybase database is the use of semicolons, which is the end of the statement.
The semicolon is the standard way to separate each SQL statement in the database so that more than one statement can be executed in the same request to the server.
No semicolons are used on the end of the SQL SERVER statement, and the Access database does not use semicolons.
The language of SQL
The language of SQL can be defined as two types: DML and DDL
So what is DML: That's what we usually use
SELECT: Fetching data from a database table
Update: Updating data in a database table
Delete: Delete data from a database table
INSERT into: Inserting data into a database table
What is the DDL language: As we normally use
Create Database
ALTER DATABASE modifies databases
CREATE table for database creation
ALTER TABLE to modify the tables of the database
drop table Delete tables for database
CREATE index
Drop INDEX to delete indexes
The first day: Finish the review
December 23, 2015 0:16 min
Start my MSSQLSERVER tour today.