Code Word SQL (1)

Source: Internet
Author: User
Tags dname

"Stereotypes" means that these knowledge is the experience that the predecessors summed up, need to remember something. These things are equally profound, but they are stuck in this. Because it's possible that you won't be able to use it for 3 years. How to say, Master Please detour, beginners should be able to see. Provides a handy weapon: PL SQL develop comes with Oracle client, decompression is available, support 12c.

http://download.csdn.net/detail/gaoguosheng/6476241

There is no other trick to learning SQL, it is practicing every day. This section lists some of the most basic sql:Single Table Select * from emp where empno >7700; Select Count(*) from emp where deptno =; Select Count(*) ,sum(sal),avg(sal) From the emp where ename like '%ne% '; Multi-table  ename dname  from  Emp dept  where empno< Span style= "color: #000080;" >>7750   and  Emp.deptno= dept.deptno; Select ename,dname from EMP join Dept on emp.deptno=Dept.deptno /c5>where empno>7750; Selectename,dname fromEMPJoinDeptusing(deptno) whereempno >7750;

Build TableCreate TableEMP2 as Select *  fromemp; Update Select * from emp where ename=' SCOTT '; Update EMP set deptno=ten where ename =' SCOTT '; Update EMP set mgr =7833,hiredate = date' 1985-01-05 ' where ename=' SCOTT '; Delete Delete from emp where empno=7788; Insert Insert into EMP (EMPNO, ename, JOB, MGR, hiredate, SAL, DEPTNO )Values (7788, ' SCOTT ', ' ANALYST ', 7566, to_date(' 04/19/1988 ', ' mm/dd/yyyy '), , );



From for notes (Wiz)



Code Word SQL (1)

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.