---
title: "oracle 一次删除，增加，修改多个字段 "
author: "Lives"
date: "2013-04-10T11:25:21Z"
tags: []
categories: ["数据库"]
slug: "oracle"
draft: false
lastmod: "2013-04-10T11:25:21Z"
id: 1844956
url: "https://lives.iteye.com/blog/1844956"
---

创建表：

SQL&gt; create table t(a number);  
   
Table created  
   
SQL&gt; desc t;  
Name Type   Nullable Default Comments  
\---- ------ -------- ------- --------  
增加多个字段                         
   
SQL&gt; alter table t add (b number,c number);  
   
Table altered  
   
SQL&gt; desc t;  
Name Type   Nullable Default Comments  
\---- ------ -------- ------- --------

修改多个字段

A    NUMBER Y                          
B    NUMBER Y                          
C    NUMBER Y                          
   
SQL&gt; alter table t modify (b varchar2(10),c varchar2(10));  
   
Table altered  
   
SQL&gt; desc t;  
Name Type         Nullable Default Comments  
\---- ------------ -------- ------- --------

删除表  
A    NUMBER       Y                          
B    VARCHAR2(10) Y                          
C    VARCHAR2(10) Y                          
   
SQL&gt; alter table t drop (b,c);  
   
Table altered  
   
SQL&gt; desc t;  
Name Type   Nullable Default Comments  
\---- ------ -------- ------- --------  
A    NUMBER Y