update userinfo set userpwd='111111';
select userpwd from userinfo;
update userinfo set userpwd='111',email='111@126.com';
select userpwd,email from userinfo;
select username from userinfo;
update userinfo set userpwd='123456' where username='xxx';
select username,userpwd from userinfo;
select userpwd from userinfo;
update userinfo set userpwd='111',email='111@126.com';
select userpwd,email from userinfo;
select username from userinfo;
update userinfo set userpwd='123456' where username='xxx';
select username,userpwd from userinfo;
2018-01-08
insert into userinfo_new select * from userinfo;
select id from useinfo_new;
insert into userinfo)new(id,username) select id,username from userinfo;
select id,username from userinfo_new;
select id from useinfo_new;
insert into userinfo)new(id,username) select id,username from userinfo;
select id,username from userinfo_new;
2018-01-08
create table userinfo_new as select * from userinfo;
desc userinfo_new;
select * from useinfo_new;
create table userinfo_new1 as select id,username from userinfo;
select * from userinfo_new1;
desc userinfo_new;
select * from useinfo_new;
create table userinfo_new1 as select id,username from userinfo;
select * from userinfo_new1;
2018-01-08
create table userinfo1(id number(6,0),regdate date default sysdate);
insert into userinfo1(id) values(1);
select *from userinfo1;
alter table userinfo modefy email deault '无';
insert into userinfo(id) values(3);
select id,email from userinfo;
insert into userinfo(id,email) values(4,'aaa');
insert into userinfo1(id) values(1);
select *from userinfo1;
alter table userinfo modefy email deault '无';
insert into userinfo(id) values(3);
select id,email from userinfo;
insert into userinfo(id,email) values(4,'aaa');
2018-01-08
insert into userinfo values(1,'xxx','123','xxx@126.com',sysdate);
select * from userinfo;
insert into userinfo(id,username,userpwd) values(2,'yyy','123');
select username,userpwd from userinfo;
select * from userinfo;
insert into userinfo(id,username,userpwd) values(2,'yyy','123');
select username,userpwd from userinfo;
2018-01-08
truncate table new_userinfo;
desc new_userinfo
drop table new_userinfo;
desc new_userinfo
desc new_userinfo
drop table new_userinfo;
desc new_userinfo
2018-01-06
alter table userinfo rename column email to new_email;
desc userinfo
rename userinfo to new_userinfo;
desc userinfo
desc new_userinfo
desc userinfo
rename userinfo to new_userinfo;
desc userinfo
desc new_userinfo
2018-01-06
alter table userinfo add remarks varchar2(500);
desc userinfo
alter table userinfo modify remarks varchar2(400);
desc userinfo
alter table userinfo modify userpwd number(6,0);
desc userinfo
alter table userinfo drop column remarks;
desc userinfo
desc userinfo
alter table userinfo modify remarks varchar2(400);
desc userinfo
alter table userinfo modify userpwd number(6,0);
desc userinfo
alter table userinfo drop column remarks;
desc userinfo
2018-01-06
create table userinfo
(id number(6,0),
username varchar2(20),
userpwd varchar2(20),
email varchar2(30),
regdate date);
desc userinfo
(id number(6,0),
username varchar2(20),
userpwd varchar2(20),
email varchar2(30),
regdate date);
desc userinfo
2018-01-06
alter tablespace test1_tablespace add datafile 'test2_file.dbf' size 10m;
select file_name from dba_files where tablespace_name='TEST1_TABLESPACE';
alter tablespace test1_tablespace drop datafile 'test2_file.dbf';
select file_name from dba_files where tablespace_name='TEST1_TABLESPACE';
select file_name from dba_files where tablespace_name='TEST1_TABLESPACE';
alter tablespace test1_tablespace drop datafile 'test2_file.dbf';
select file_name from dba_files where tablespace_name='TEST1_TABLESPACE';
2018-01-06
alter tablespace test1tablespace read only;
select status from dba_tablespaces where tablespace_name='TEST1_TABLESPACE';
alter tablespace test1_tablespace read write;
select status from dba_tablespaces where tablespace_name='TEST1_TABLESPACE';
alter tablespace test1_tablespace read write;
2018-01-06
alter tablespace test1_tablespace offline;
desc dba_tablespaces;
select status from dba_tablespaces where tablespace_name='TEST1_TABLESPACE';
alter tablespace test1_tablespace online;
select status from dba_tablespaces where tablespace_name='TEST1_TABLESPACE';
desc dba_tablespaces;
select status from dba_tablespaces where tablespace_name='TEST1_TABLESPACE';
alter tablespace test1_tablespace online;
select status from dba_tablespaces where tablespace_name='TEST1_TABLESPACE';
2018-01-06
desc dba_data_files
select file_name from dba_data_files where tablespace_name='TEST1_TABLESPACE';
select file_name from dba_temp_files where tablespace_name='TEMPTEST1_TABLESPACE';
select file_name from dba_data_files where tablespace_name='TEST1_TABLESPACE';
select file_name from dba_temp_files where tablespace_name='TEMPTEST1_TABLESPACE';
2018-01-06
create tablespace test1_tablespace datafile 'test1file.dbf' size 10m;
create temporary tablespace teptest1_tablespace tempfile 'tempfile1.dbf' size 10m;
create temporary tablespace teptest1_tablespace tempfile 'tempfile1.dbf' size 10m;
2018-01-06