Oracle学习笔记第五天

Oracle学习笔记第五天

表相关操作

增:

添加表之前已经有了,不再多说;

删:

truncate table mytable;					-- 删除表里面的所有数据,表还在
delete from student where 1 = 1 ;		-- 删除表里面的所有数据,表还在
drop table mytable;						-- 删除表和表里的数据
drop table mytable purge;				-- 永久性删除表,不能恢复:

查:

select table_name from user_tables;  	-- 当前用户的表      
select table_name from all_tables; 		-- 所有用户的表  
select table_name from dba_tables; 		-- 包括系统表
desc 表名;							  -- 在命令窗口下可以实现,PL/SQL软件中会报错...
select * from user_tab_columns where Table_Name='用户表名'; 	-- 查看表结构
select * from all_tab_columns  where Table_Name='用户表名'; 
select * from dba_tab_columns  where Table_Name='用户表名';

改:

这部分在第二天已经有了,这里也不描述了。

猜你喜欢

转载自blog.csdn.net/xxydzyr/article/details/84443820