1、数据 data数据库 databace(db)数据库管理系统 DBMS数据库管理员 DBA数据库系统 DB systemSQL sever 微软的Oracle 甲骨文公司的DB2-IBM 公司的Mysql-sun 公司的(被甲骨文收购了)Access -毕业设计练习可以用DDL:create 增 drop 删 alter 改 desc/describe查对象:table view index sequenceDML:select insert delete update对象是数据;DCL:分配权限 创建账户如下: -select * from contractrecruiter -select
2、 CNAME “名字“,NPERCENTAGECHARGE “百分比“ from-contractrecruiter; -select CNAME as “名字“,NPERCENTAGECHARGE as “百分比“ fromcontractrecruiter; -desc college;select CCITY as 城市 ,VCOLLEGEADDRESS as 所在地地址 from college;有相减的:select VDESCRIPTION as 职位,NBUDGETEDSTRENGTH as 人数, NBUDGETEDSTRENGTH -NCURRENTSTRENGTH as 差
3、额from position;distinct 把显示出来的一列一样的过滤 但是如果一行没有重复,则不过滤如 select distinct ccity from externalcandidate;和 select distinct ccity, CPOSITIONCODE from externalcandidate;所显示的行数不一样相除; select NPREVANNUALSALARY /5,NPREVANNUALSALARY from externalcandidate;并:select vfirstname| |vlastname from externalcandidate;在
4、 oracle 里,只有列明用双引号,其他都用单引号常量:select 王远华 from dual;select CCOLLEGENAME as 学院 from collegewhere CSTATE =California ;dos 下的模糊查询时:?和*在 oracle 中模糊查询时*和_;select * from newspaperwhere CNEWSPAPERNAME like %Texas% and VCONTACTPERSON like Jackson %;Escape 是转义符 表示在其后“”里的后面不是通配符,可以查询%和*等空值检索: is nullselect * fr
5、om externalcandidatewhere dinterviewdate is null;但不能用=非空检索: is not nullselect * from externalcandidatewhere dinterviewdate is not null;但不能用!=以特定顺序排序:select cpositioncode,vdescriptionfrom positionorder by cpositioncode desc;默认为升序 asc;函数:单行函数、多行函数Initcap 把首字母大写select initcap (man)from dualupper 全部大写lower 全部小写select upper(vfirstname),lower(vlastname)from externalcandidateltrim(string,set)其中 char 里是字符集合数值函数:取绝对值:100天花板:比原来的指大,但必须是整数-2Ceil地板:比原来的指小,但必须是整数-6次方:1024