zoukankan      html  css  js  c++  java
  • oracle(2)

    create table aaa(
    id number,
    name varchar2(100)
    );
    select decode((select max(id) from aaa),null,'x',(select max(id) from aaa)) from dual;
    create tablespace &username  datafile '/oracle/oradata/orcl/&username.dbf'
    size 512m
    autoextend on
    next 100m
    maxsize unlimited
    minimum extent 25m
    default storage 
    (initial 128k 
    next 128k
    minextents 1   
    maxextents unlimited   
    pctincrease 0);
    
    create user &username --为数据库用户名,请根据情况修改
    identified by &username --为数据库用户密码,请根据情况修改
    default tablespace &username --为创建的表空间名
    temporary tablespace temp
    quota unlimited on &username; 
    
    grant dba to &username;
    
    imp w20170630/w20170630@192.168.218.171:1521/wlydb file=E:ku数据库备份20170630223000.dmp ignore=y full=y
    
    imp w20170810/w20170810 file=/tmp/20170810.dmp log=/tmp/20170810.log full=y 
      1. ip导出方式: exp demo/demo@127.0.0.1:1521/orcl file=f:/f.dmp full=y  
      2. exp demo/demo@orcl file=f:/f.dmp full=y  
      3. imp demo/demo@orcl file=f:/f.dmp full=y ignore=y
    注意: 如果你的sql语句中 有什么判断语句 where id1 != 1这种   会默认过滤掉id为空的数据,也就是说能查出来id1不为1的数据,但是查不出来id1为空的数据
  • 相关阅读:
    清空数据库所有表数据
    sqlserver编号
    Inherits、CodeFile、CodeBehind的区别
    初识NuGet
    ASP.Net各个命名空间及作用
    SQL SERVER数据库性能优化之SQL语句篇
    Exercise 20: Functions And Files
    Exercise 19: Functions And Variables
    Exercise 18: Names, Variables, Code, Functions
    Exercise 17: More Files
  • 原文地址:https://www.cnblogs.com/lifusen/p/7562661.html
Copyright © 2011-2022 走看看