SQL _ experiment 1.3 Tsinghua University Press

Source: Internet
Author: User

/* 1. */insertinto studentsvalues ('123456', 'liming', 'lx @ cdemg.com ', 70045678);/* 2. */create table choices_result (cid char (10), students smallint, avgscore smallint); insert into choices_resultselect cid, count (sid), avg (score) from choicesgroup by cid; /* 3 */update studentsset grade = '000000' where sname = 'liming ';
/* 4. */update teachersset salary = salary + 500;/* 5. */update choicesset score = score + 5 where choices. no = (select choices. nofrom choices, courses, studentswhere courses. cid = choices. cid and students. sid = choices. sidand courses. cname = 'C' and students. sname = 'zapyv');/* 6. */delete studentswhere sname = 'liming';/* 7. */deletefrom choiceswhere 'java' = (select cnamefrom courseswhere courses. cid = choices. cid);/* 8. */deletefrom choiceswhere choices. cid in (select courses. cidfrom courseswhere courses. hour <48); delete courseswhere hour <48;

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.