oracle的高级语句的功能


1.更新语句批量操作。

 Update t_sa_deployee_info t Set t.deployee_type_id=t.personnel_id------把一个表中的一个字段值付给另外一个字段

2。批量插入操作。
eg:
  Insert Into t_Sa_Accounts
 (Accounts_Id, Deployee_Id, Bank_Id, Accounts)------t_Sa_Accounts表中的字段
 (Select Seq_Sa_Account.Nextval , De.Deployee_Id, De.Bank_Id, De.a_Account
  From t_Sa_Deployee_Info De)-------Seq_Sa_Account序列,自动增加付给t_Sa_Accounts表中的主键Accounts_Id, 从人员表获取相对应的数据给人员账号表中。

-----------注意这里没有values属性
3.更新语句批量操作。
Update t_Sa_Salary a
Set a.Salary_9 = (Select t.Salary_9 From t_Sa_Salary t Where t.Month = 2 And t.Deployee_Id = a.Deployee_Id),
a.Salary_20 = (Select t.Salary_20 From t_Sa_Salary t Where t.Month = 2 And t.Deployee_Id = a.Deployee_Id)
Where a.Year = 2007 And a.Month = 3

通过语句创建数据库
create user data(数据库名) identified by password(密码) default tablespace users(表空间);
grant dba,resource to data; 

imp data/password@sid file=d:/***.dmp FULL=Y
exp data/password@oracle_192.168.2.110 file=d:/data.dmp (tables = xy_admin) 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值