在ORACLE和sql server中简单备份table的方法
如果temp_t1不存在,
oracle:
create table temp_t1
as
select * from t1
sql server:
select * into temp_t1 from t1
如果temp_t1存在,
oracle:
insert into table temp_t1
select * from t1
sql server:
insert into table temp_t1
select * from t1
相关文档:
问:什么是NULL?
答:在我们不知道具体有什么数据的时候,也即未知,可以用NULL,我们称它为空,ORACLE中,含有空值的表列长度为零。
ORACLE允许任何一种数据类型的字段为空,除了以下两种情况:
1、主键字段(primary key),
2、定义时已经加了NOT NULL限制条件的字段
说明:
1、等价于没有任何值、是未知 ......
//取出源数据
select groupname,totalnum,inputdate,groupid into #temp from
(select count(*)as totalnum,p.groupid,g.groupname,convert(nvarchar(10),inputdate,120) as 'inputdate'
from person p left join admin_group g on p.groupid = g.groupid and deleteflag = '0'
where p.inactive=' ......
http://blog.csdn.net/fenglibing/archive/2007/10/24/1841537.aspx
1、将一个表中的内容拷贝到另外一个表中
insert into testT1(a1,b1,c1) select a,b,c from test;
insert into testT select * from test; (前提是兩個表的結構完全相同)
insert into notebook(id,title,content)
se ......
. SQL 命令
这部分包含那些 PostgreSQL 支持的 SQL 命令的信息.这里的 "SQL" 就是该语言通常的含义; 每条命令的与标准有关的兼容性的信息可以在相关的参考页中找到.
Table of Contents
ABORT -- 退出当前事务
ALTER GROUP -- 向组中增加用户或从组中删除用户
ALTER USER -- 改变数据库 ......