20150929 What to learn: SQL

Source: Internet
Author: User

Server name: Refers to the IP address of the computer where you want to connect the installed database server, if it is the local, it is.

MDF end: Database data files, one database with only one

LDF: Database log files, one database with and at least one

The structure of data stored in a database is stored as a table, and there are many tables in a database

20150929

CREATE DATABASE xuankedata--

go--Connector

Use xuankedata-- using the database

Go

CREATE table student--creating tables

(

code int NOT null,--column name type is empty

Name varchar (20),

Sex int,

Height decimal (18,2)

)

Go

insert into student values(2, ' Zhang San ', 1,1.85)-- input data

Go

Select*from student--Querying the contents of a table

Go

Drop table student-- Delete Tables

Go

Drop Database xuankedata--delete databases , first point to another database, deleted database cannot be in use

Go

Update student set name= ' Zhang San ' where code=2-- Modify the contents of the table, where filter

Go

Delete from student where name= ' John Doe '-- delete data from table

Go

20150929 What to learn: SQL

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.