alter table语法

2024-06-04 17:08
文章标签 语法 table alter

本文主要是介绍alter table语法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

文档地址:http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_3001.htm#CIHCFDDJ

 

ALTER TABLE

Purpose

Use the ALTER TABLE statement to alterthe definition of a nonpartitioned table, a partitioned table, atable partition, or a table subpartition. For object tables orrelational tables with object columns, use ALTERTABLE to convert the table to the latest definition ofits referenced type after the type has been altered.

 

 

add_column_clause::=

Description of add_column_clause.gif follows
Description of the illustrationadd_column_clause.gif

(column_definition::=,column_properties::=)

column_definition::=

Description of column_definition.gif follows

column_definition

Unless otherwise noted in this section, the elements ofcolumn_definition have the samebehavior when adding a column to an existing table as they do whencreating a new table. Please refer to column_definition for information.

Restriction on column_definition TheSORT parameter is valid only when creating a newtable. You cannot specify SORT in thecolumn_definition of an ALTER TABLE ...ADD statement.

If you add a column, then the initial value of each row for thenew column is null unless you specify the DEFAULTclause. In this case, Oracle Database updates each row in the newcolumn with the value you specify for DEFAULT. Thisupdate operation, in turn, fires any AFTERUPDATE triggers defined on the table.

Note:

If a column has a default value, then you can use the DEFAULT clause to change the default to NULL, but you cannot remove the default valuecompletely. That is, if a column has ever had a default valueassigned to it, then the DATA_DEFAULT column of the USER_TAB_COLUMNS data dictionary view will alwaysdisplay either a default value or NULL.

You can add an overflow data segment to each partition of apartitioned index-organized table.

You can add LOB columns to nonpartitioned and partitionedtables. You can specify LOB storage at the table and at thepartition or subpartition level.

If you previously created a view with a query that used theSELECT * syntax to select all columnsfrom table, and you now add a column to table, then the database doesnot automatically add the new column to the view. To add the newcolumn to the view, re-create the view using theCREATE VIEW statement with theOR REPLACE clause. Please refer toCREATE VIEW for more information.

 

这篇关于alter table语法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/1030608

相关文章

C++语法知识点合集:11.模板

文章目录 一、非类型模板参数1.非类型模板参数的基本形式2.指针作为非类型模板参数3.引用作为非类型模板参数4.非类型模板参数的限制和陷阱:5.几个问题 二、模板的特化1.概念2.函数模板特化3.类模板特化(1)全特化(2)偏特化(3)类模板特化应用示例 三、模板分离编译1.概念2.模板的分离编译 模版总结 一、非类型模板参数 模板参数分类类型形参与非类型形参 非类型模板

Java基础回顾系列-第一天-基本语法

基本语法 Java基础回顾系列-第一天-基本语法基础常识人机交互方式常用的DOS命令什么是计算机语言(编程语言) Java语言简介Java程序运行机制Java虚拟机(Java Virtual Machine)垃圾收集机制(Garbage Collection) Java语言的特点面向对象健壮性跨平台性 编写第一个Java程序什么是JDK, JRE下载及安装 JDK配置环境变量 pathHe

vue2实践:el-table实现由用户自己控制行数的动态表格

需求 项目中需要提供一个动态表单,如图: 当我点击添加时,便添加一行;点击右边的删除时,便删除这一行。 至少要有一行数据,但是没有上限。 思路 这种每一行的数据固定,但是不定行数的,很容易想到使用el-table来实现,它可以循环读取:data所绑定的数组,来生成行数据,不同的是: 1、table里面的每一个cell,需要放置一个input来支持用户编辑。 2、最后一列放置两个b

Hibernate框架中,使用JDBC语法

/*** 调用存储过程* * @param PRONAME* @return*/public CallableStatement citePro(final String PRONAME){Session session = getCurrentSession();CallableStatement pro = session.doReturningWork(new ReturningWork<C

ORACLE语法-包(package)、存储过程(procedure)、游标(cursor)以及java对Result结果集的处理

陈科肇 示例: 包规范 CREATE OR REPLACE PACKAGE PACK_WMS_YX IS-- Author : CKZ-- Created : 2015/8/28 9:52:29-- Purpose : 同步数据-- Public type declarations,游标 退休订单TYPE retCursor IS REF CURSOR;-- RETURN vi_co_co

ElasticSearch的DSL查询⑤(ES数据聚合、DSL语法数据聚合、RestClient数据聚合)

目录 一、数据聚合 1.1 DSL实现聚合 1.1.1 Bucket聚合  1.1.2 带条件聚合 1.1.3 Metric聚合 1.1.4 总结 2.1 RestClient实现聚合 2.1.1 Bucket聚合 2.1.2 带条件聚合 2.2.3 Metric聚合 一、数据聚合 聚合(aggregations)可以让我们极其方便的实现对数据的统计、分析、运算。例如:

react笔记 8-16 JSX语法 定义数据 数据绑定

1、jsx语法 和vue一样  只能有一个根标签 一行代码写法 return <div>hello world</div> 多行代码返回必须加括号 return (<div><div>hello world</div><div>aaaaaaa</div></div>) 2、定义数据 数据绑定 constructor(){super()this.state={na

python基础语法十一-赋值、浅拷贝、深拷贝

书接上回: python基础语法一-基本数据类型 python基础语法二-多维数据类型 python基础语法三-类 python基础语法四-数据可视化 python基础语法五-函数 python基础语法六-正则匹配 python基础语法七-openpyxl操作Excel python基础语法八-异常 python基础语法九-多进程和多线程 python基础语法十-文件和目录操作

通过Ajax请求后台数据,返回JSONArray(JsonObject),页面(Jquery)以table的形式展示

点击“会商人员情况表”,弹出层,显示一个表格,如下图: 利用Ajax和Jquery和JSONArray和JsonObject来实现: 代码如下: 在hspersons.html中: <!DOCTYPE html><html><head><meta charset="UTF-8"><title>会商人员情况表</title><script type="text/javasc

UVa 10820 Send a Table (Farey数列欧拉函数求和)

这里先说一下欧拉函数的求法 先说一下筛选素数的方法 void Get_Prime(){ /*筛选素数法*/for(int i = 0; i < N; i++) vis[i] = 1;vis[0] = vis[1] = 0;for(int i = 2; i * i < N; i++)if(vis[i]){for(int j = i * i; j < N; j += i)vis[j] =