2. Oracle – SQL
09Mar11
開新的table
create table table_name ( Attribute_name type, ... , primary key ( attribute_name), foreign key ( attribute_name ) references table_name );
刪除一個table
drop table table_name;
在現有的table加一個Column
alter table table_name add Attribute Type;
在現有的table刪除一個Column
alter table table_name drop Attribute;
選取資料
select Attribute from table_name;
用Where clause的Select statement
select a.Attribute, b.Attribute2 from table_name as a, table_name2 as b where a.sth = b.sth;
增加在Command Line 顯示的闊度到250個字元
set lin 250
Filed under: oracle | Leave a Comment



No Responses Yet to “2. Oracle – SQL”