Create the database, the database internal additions and deletions to change the statement

Source: Internet
Author: User

--Create a database with the name banji0425Create Databasebanji0425Go--Apply banji0425 Database Usebanji0425Go--Create a table with the name TongxueCreate TableTongxue (Codeint, nameChar( -), SexChar( -), nianlingint, Fenshudecimal( -,2), DizhiChar( -),)Go--Insert Table ContentsInsert  intoTongxueValues(1,'Liu','male', -, the,'Huantai')GoInsert  intoTongxueValues(2,'Zhang Demin','male', A, the,'Yiyuan')Insert  intoTongxueValues(3,'Ma Zhijie','male', -, -,'Linzi')Insert  intoTongxueValues(4,'Ma Qingxin','male', A, the,'Zhangdian')Insert  intoTongxueValues(5,'Jindong','male', -, the,'Yiyuan')Insert  intoTongxueValues(6,'Gao','male', -, -,'Zhangdian')Insert  intoTongxueValues(7,'Zhang Yuqi','male', -, the,'Yiyuan')Insert  intoTongxueValues(8,'Qixin','male', -, the,'Zhoucun')Insert  intoTongxueValues(9,'Liu Yan Rui','male', -, -,'Zhangdian')Go--querying all the contents of a tableSelect * fromTongxueGo--Query Name columnSelectName fromTongxueGo--querying the contents of name and nianling two columnsSelectName,nianling fromTongxueGo--querying the behavior code3 all contentSelect * fromTongxuewhereCode=3Go--Query the name Fenshu to 85SelectName fromTongxuewhereFenshu= -Go--modified code=3 Fenshu toUpdateTongxueSetFenshu= the whereCode=3GoSelect * fromTongxuewhereCode=3Go--The name of the person whose score is 95 and the age of 24 yearsSelectName fromTongxuewhereFenshu= the  andNianling= -Go

Create the database, the database internal additions and deletions to change the statement

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.