• MySql的更新


    ###MySql的更新

    -----

    select* from emp;

    select * from dept1;

    #####查询语句

    update emp a,dept b set a.sal=a.sal*b.deptno,b.deptname=a.ename where a.deptno=b.deptno;

    #####删除记录

    ·delete from emp where ename='dony';

    #####查询部分字段

    select ename,hiredate,sal,deptno from emp;

    #####查询不重复的字段

    select distinct deptno from emp;

    #####条件查询

    select * from emp where deptno=1;

    select * from emp where deptno=1 and sal<3000;

  • 相关阅读:
    JDom写入XML例子
    hdu 2549
    hdu 1328
    hdu 1334
    hdu 2547
    hdu 2374
    hdu 2550
    hdu 1335
    hdu 2548
    hdu 1722
  • 原文地址:https://www.cnblogs.com/xiuxiu123/p/5064221.html
Copyright © 2020-2023  润新知