请教Table使用方法 select *select a from tablee

Bootstrap Table的使用总结
作者:码农小汪
字体:[ ] 类型:转载 时间:
这篇文章主要介绍了Bootstrap Table的使用小结,本文介绍的非常详细,具有参考借鉴价值,感兴趣的朋友一起看看吧
Jquery中的一些东西学习一下子,补充完善一下,毕竟有些时候没有使用到这个方式很有用,在使用bootstrap table的时候,选择当前已经选择的节点的事件中的ID的值 当前rows中有很多的数据,但是我只需要id这一个值,这个时候进行操作就非常的简单了。
$.map(data,function(item,index){return XXX})
使用的总结:
把一个数组,按照新的方式进行组装返回,和原来的数组不一样。
遍历data数组中的每个元素,并按照return中的计算方式 形成一个新的元素,放入返回的数组中
var b = $.map( [55,1,2], function( item,index )
"label": item,
"value": index
alert(b[0].label +" "+ b[0].value);
输出为 55 0
2.我的后台呢,是使用SpringMVC进行写的,期间呢也是遇到了很多的问题 ,进行分页处理的时候使用了离线查询,但是呢,我使用的是execute()这个方法,传入的session为代理类的数据,不能再下面这个方法中进行转换导致错误了,我还百度了很久,最后才发现是这个问题导致的
* Get an executable instance of &literal&Criteria&/literal&,
* to actually run the query.
public Criteria getExecutableCriteria(Session session) {
impl.setSession( ( SessionImplementor ) session );
return (PageBean) getHibernateTemplate().executeWithNativeSession(new HibernateCallback() {
public Object doInHibernate(Session session) throws HibernateException {
Criteria criteria = detachedCriteria.getExecutableCriteria(session);
............................
后台呢,我返回的数据和格式不是按照BootStrap中的格式有点差别吧,反正就是不一样
"success": true,
"message": null,
"pageSize": 15,
"userName": "333",
"userType": 333,
"password": "333",
"indexcode": "333"
"userName": "3",
"userType": 333,
"password": "333",
"indexcode": "33333"
"total": 17,
"totalPage": 2,
"page": 0,
"hasPreviousPage": true,
"hasNextPage": true,
"lastPage": false,
"firstPage": false
主要是这里我是用了统一的返回接口 ActionResult,这样比较方便书写格式,统一后端
* Created by JetWang on .
public class ActionResult {
public ActionResult(){
public ActionResult(boolean success){
this(success, null, null);
............
来看看前端的效果吧
前端的页面
&%@ include file="./common/common.jsp"%& //什么公用的bootstrapt ,JQuery啊之类的引用放进去处理了
&script src="&%=baseUrl%&/libs/bootstrap-table/dist/bootstrap-table.js" type="text/javascript"&&/script&
&script src="&%=baseUrl%&/libs/bootstrap-table/dist/bootstrap-table-locale-all.js" type="text/javascript"&
&link rel="stylesheet" href="&%=baseUrl%&/libs/bootstrap-table/dist/bootstrap-table.css" type="text/css"&
//这里就是容器中放置table的
&div class="container"&
&table id="table"
data-url="/cms/UserInfo/userInfoPage"&//使用的路径,后台请求的URL
比较重要的JS代码的说明
jQuery(document).ready(function() {
//这里你可以使用各种法师,也可以使用seajs前端模块化工具
下面放置我们的js代码就好了
下面的配置文件和一些事件的重写呢,你可以查看文档,或者自己去看看你源码
这里你可以进行重写哦~~ ,extentd进行重新的覆盖!
BootstrapTable.DEFAULTS = {
classes: 'table table-hover',
locale: undefined,
height: undefined,
undefinedText: '-',
sortName: undefined,
sortOrder: 'asc',
sortStable: false,
striped: false,
columns: [[]],
dataField: 'rows',
method: 'get',
url: undefined,
ajax: undefined,
cache: true,
contentType: 'application/charset=UTF-8',//这里我就加了个utf-8
dataType: 'json',
ajaxOptions: {},
queryParams: function (params) {//这个是设置查询时候的参数,我直接在源码中修改过,不喜欢offetset 我后台用的 是pageNo. 这样处理就比较的满足我的要求,其实也可以在后台改,麻烦!
queryParamsType: 'limit', // undefined (这里是根据不同的参数,选择不同的查询的条件)
responseHandler: function (res) {//这里我查看源码的,在ajax请求成功后,发放数据之前可以对返回的数据进行处理,返回什么部分的数据,比如我的就需要进行整改的!
pagination: false,
onlyInfoPagination: false,
sidePagination: 'client', // client or server
totalRows: 0, // server side need to set
pageNumber: 1,
pageSize: 10,
pageList: [10, 25, 50, 100],
paginationHAlign: 'right', //right, left
paginationVAlign: 'bottom', //bottom, top, both
paginationDetailHAlign: 'left', //right, left
paginationPreText: '&',
paginationNextText: '&',
search: false,
searchOnEnterKey: false,
strictSearch: false,
searchAlign: 'right',
selectItemName: 'btSelectItem',
showHeader: true,
showFooter: false,
showColumns: false,
showPaginationSwitch: false,//展示页数的选择?
showRefresh: false,
showToggle: false,
buttonsAlign: 'right',
smartDisplay: true,
escape: false,
minimumCountColumns: 1,
idField: undefined,
uniqueId: undefined,
cardView: false,
detailView: false,
detailFormatter: function (index, row) {
return '';
trimOnSearch: true,
clickToSelect: false,
singleSelect: false,
toolbar: undefined,
toolbarAlign: 'left',
checkboxHeader: true,
sortable: true,
silentSort: true,
maintainSelected: false,
searchTimeOut: 500,
searchText: '',
iconSize: undefined,
buttonsClass: 'default',
iconsPrefix: 'glyphicon', // glyphicon of fa (font awesome)
paginationSwitchDown: 'glyphicon-collapse-down icon-chevron-down',
paginationSwitchUp: 'glyphicon-collapse-up icon-chevron-up',
refresh: 'glyphicon-refresh icon-refresh',
toggle: 'glyphicon-list-alt icon-list-alt',
columns: 'glyphicon-th icon-th',
detailOpen: 'glyphicon-plus icon-plus',
detailClose: 'glyphicon-minus icon-minus'
customSearch: $.noop,
customSort: $.noop,
rowStyle: function (row, index) {
return {};
rowAttributes: function (row, index) {
return {};
footerStyle: function (row, index) {
return {};
onAll: function (name, args) {
onClickCell: function (field, value, row, $element) {
onDblClickCell: function (field, value, row, $element) {
onClickRow: function (item, $element) {
onDblClickRow: function (item, $element) {
onSort: function (name, order) {
onCheck: function (row) {
onUncheck: function (row) {
onCheckAll: function (rows) {
onUncheckAll: function (rows) {
onCheckSome: function (rows) {
onUncheckSome: function (rows) {
onLoadSuccess: function (data) {
onLoadError: function (status) {
onColumnSwitch: function (field, checked) {
onPageChange: function (number, size) {
onSearch: function (text) {
onToggle: function (cardView) {
onPreBody: function (data) {
onPostBody: function () {
onPostHeader: function () {
onExpandRow: function (index, row, $detail) {
onCollapseRow: function (index, row) {
onRefreshOptions: function (options) {
onRefresh: function (params) {
onResetView: function () {
看看上面的自己也基本上晓得怎么去,书写了!其实之前我根本不敢这么玩,只不过之前实习过程中导师教过我怎么去玩,所以我才敢,我相信,我可以好好的 玩好这些东西的!
function initTable() {
$table.bootstrapTable({
striped: true, //表格显示条纹
pagination: true, //启动分页
pageSize: 15, //每页显示的记录数
pageNumber:1, //当前第几页
pageList: [10, 15, 20, 25], //记录数可选列表
search: false, //是否启用查询
showColumns: true, //显示下拉框勾选要显示的列
showRefresh: true, //显示刷新按钮
sidePagination: "server", //表示服务端请求
//设置为undefined可以获取pageNumber,pageSize,searchText,sortName,sortOrder
//设置为limit可以获取limit, offset, search, sort, order
responseHandler:function(res){
//远程数据加载之前,处理程序响应数据格式,对象包含的参数: 我们可以对返回的数据格式进行处理
//在ajax后我们可以在这里进行一些事件的处理
return res.
queryParamsType : "undefined",
queryParams: function queryParams(params) { //设置查询参数
var param = {
//这里是在ajax发送请求的时候设置一些参数 params有什么东西,自己看看源码就知道了
pageNo: params.pageNumber,
pageSize: params.pageSize
onLoadSuccess: function(data){ //加载成功时执行
alert("加载成功"+data);
onLoadError: function(){ //加载失败时执行
layer.msg("加载数据失败", {time : 1500, icon : 2});
height: getHeight(),
columns: [
field: 'state',
checkbox: true,
align: 'center',
valign: 'middle'
title: 'ID',
field: 'id',
align: 'center',
valign: 'middle'
field: 'userName',
title: 'UserName',
sortable: true,
footerFormatter: totalNameFormatter,
align: 'center'
field: 'userType',
title: 'UserType',
sortable: true,
align: 'center'
field: 'password',
title: 'UserPass',
sortable: true,
align: 'center'
field: 'indexcode',
title: 'Indexcode',
sortable: true,
align: 'center'
field: 'operate',
title: 'Item Operate',
align: 'center',
events: operateEvents,
formatter: operateFormatter
上面的 footerFormatter 和 formatter 都是对于当前列的显示进行处理的事件,文档中如下
formatter:
The context (this) is the column Object. The cell formatter function, take three parameters: value: the field value. row: the row record data. index: the row index.
footerFormatter :
The context (this) is the column Object. The function, take one parameter:
data: Array of all the data rows. the function should return a string with the text to show in the footer cell.
都是对于当前列进行处理显示
如下就是增加了两个按钮在一个单元格中
function operateFormatter(value, row, index) {
'&a class="like" href="javascript:void(0)" title="Like"&',
'&i class="glyphicon glyphicon-heart"&&/i&',
'&a class="remove" href="javascript:void(0)" title="Remove"&',
'&i class="glyphicon glyphicon-remove"&&/i&',
].join('');
也可以在这里就增加事件的处理
title: '操作',
field: 'id',
align: 'center',
formatter:function(value,row,index){
var e = '&a href="#" mce_href="#" onclick="edit(\''+ row.id + '\')"&编辑&/a& ';
var d = '&a href="#" mce_href="#" onclick="del(\''+ row.id +'\')"&删除&/a& ';
return e+d;
也可以这样处理事件的
官方中文档说的处理事件可以像下面这里处理
The cell events listener when you use formatter function, take four parameters: event: the jQuery event. value: the field value. row: the row record data. index: the row index.
Example code:
field: 'operate',
title: 'Item Operate',
align: 'center',
events: operateEvents,
formatter: operateFormatter
function operateFormatter(value, row, index) {
'&a class="like" href="javascript:void(0)" title="Like"&',
'&i class="glyphicon glyphicon-heart"&&/i&',
'&a class="remove" href="javascript:void(0)" title="Remove"&',
'&i class="glyphicon glyphicon-remove"&&/i&',
].join('');
window.operateEvents = {
'click .like': function (e, value, row, index) {
alert('You click like action, row: ' + JSON.stringify(row));
'click .remove': function (e, value, row, index) {
$table.bootstrapTable('remove', {
field: 'id',
values: [row.id]
处理系统中存在的事件的处理,文档中有说
$('#table').bootstrapTable({
onEventName: function (arg1, arg2, ...) {
$('#table').on('event-name.bs.table', function (e, arg1, arg2, ...) {
这个名字文档中很多!
onAll all.bs.table
name, args
Fires when all events trigger, the parameters contain:
name: the event name,
args: the event data.
处理一些方法,比如当前选择了多少行,全选等等
The calling method syntax: $('#table').bootstrapTable('method', parameter);
1 当前选择选的框框的id
getSelections none Return selected rows, when no record selected, an empty array will return.
getAllSelections none Return all selected rows contain search or filter, when no record selected, an empty array will return.
$table.on('all.bs.table', function (e, name, args) {
console.log(name, args);
3.删除 前台的数据,不需要从后台重新加载
remove params Remove data from table, the params contains two properties:
field: the field name of remove rows.
values: the array of values for rows which should be removed.
.....很多很多的东西!
一个删除的按钮,删除所有的选择的事件!是不是很好呢!
function getIdSelections() {
return $.map($table.bootstrapTable('getSelections'), function (row) {
return row.id
$remove.click(function () {
var ids = getIdSelections();
$table.bootstrapTable('remove', {
field: 'id',
values: ids
$remove.prop('disabled', true);
以上所述是小编给大家介绍的Bootstrap Table的使用总结,希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对脚本之家网站的支持!
您可能感兴趣的文章:
大家感兴趣的内容
12345678910
最近更新的内容
常用在线小工具我给你说select
from table where 1=1让您茅塞顿开_百度文库
两大类热门资源免费畅读
续费一年阅读会员,立省24元!
我给你说select
from table where 1=1让您茅塞顿开
&&select * from table where 1=1 的用法
阅读已结束,下载文档到电脑
想免费下载更多文档?
定制HR最喜欢的简历
你可能喜欢2014年1月 总版技术专家分月排行榜第二2013年12月 总版技术专家分月排行榜第二
2016年10月优秀小版主
2011年12月 总版技术专家分月排行榜第三2011年9月 总版技术专家分月排行榜第三
2011年6月 MS-SQL Server大版内专家分月排行榜第一
2013年 总版技术专家分年内排行榜第二
2014年8月 总版技术专家分月排行榜第一2014年7月 总版技术专家分月排行榜第一2014年6月 总版技术专家分月排行榜第一2014年5月 总版技术专家分月排行榜第一2014年4月 总版技术专家分月排行榜第一2014年3月 总版技术专家分月排行榜第一2014年1月 总版技术专家分月排行榜第一2013年12月 总版技术专家分月排行榜第一
2013年 总版技术专家分年内排行榜第二
2014年8月 总版技术专家分月排行榜第一2014年7月 总版技术专家分月排行榜第一2014年6月 总版技术专家分月排行榜第一2014年5月 总版技术专家分月排行榜第一2014年4月 总版技术专家分月排行榜第一2014年3月 总版技术专家分月排行榜第一2014年1月 总版技术专家分月排行榜第一2013年12月 总版技术专家分月排行榜第一
2010年7月 荣获微软MVP称号
2008年11月 MS-SQL Server大版内专家分月排行榜第一2008年10月 MS-SQL Server大版内专家分月排行榜第一
2010年7月 荣获微软MVP称号
2008年11月 MS-SQL Server大版内专家分月排行榜第一2008年10月 MS-SQL Server大版内专家分月排行榜第一
本帖子已过去太久远了,不再提供回复功能。65410人阅读
oracle开发SQL语句(273)
数据库间的数据迁移(32)
1、再做一些数据迁移时候,很多人会使用create table& as select * from table where id=-1的方式来年建立一摸一样的表,但是这样做有个很大的弊端,不能将原表中的default value也一同迁移过来。
2、& Using the CREATE TABLE ... AS SELECT ... command: This command will copy acrooss to the new table all the data,but the constraints triggers ,and so
on will not be transferred to the new table.
&&&&&&& 那些都是not null约束,其他的约束和trigger是带不过来了,严格说来not null也是约束的一种,只不过教材上把它排除在外了吧。
博客分类:&
再做一些数据迁移时候,很多人会使用create table& as select * from table where id=-1的方式来年建立一摸一样的表,但是这样做有个很大的弊端,不能将原表中的default value也一同迁移过来,可以看下面的例子:
第一,新建一个表
-- Create table
create table table01
& id&&&&&&& number(16),
& add_date& date default sysdate,
& status&&& number(1),
& entp_code varchar2(200)
第二,使用create table table02 as
select * From table01 where id=-1
第三、看看两个表的结构,会发现第二张表的defaule value没有了,如下2图,可以很明显看出来,表02的add_date的默认值得sysdate没有了
table01的表结构
&table02的表结构
所以各位在做数据库迁移时候,使用create table as select时候,一定要注意默认值的问题
上周,因为此问题,导致生产环境下产生了大量的问题,头大了一天,特此奉献出来。
====================================================================
SQL & create table emp_copy as select * from emp where deptno=10;
第一,注意emp_copy表中没有定义任何列名,因为我们在列子句中用通配符从emp表取得数据,让Oracle像emp表中一样生成emp_copy表中的列——相同名称,相同数据类型定义。
第二,SQL*PLUS中可以发出的任何select语句可以放在create table as select 语句中,然后Oracle会自动获得从emp表选择的数据,在进emp_copy表中。但是 如果select语句的列子句中包括特定列清单,则create table子句要列出表中要包括的列,放在括号中,例如:
SQL & create table emp_copy_2 (empno,sal) as select empno, sal from emp where deptno=10;
========================================================
& 11:39:26
分类:&Linux
大家都知道可以创建一个与表结构一样的表,但是在实际应用中最好不要这么创建表。原因是这样只创建表的结构,而不会将原表的默认值一起创建。
说白了,表结构出来了,默认值没有。
另外,但是有一个我对一个大表执行时候报了一个表空间不足,不知道是什么原因,记录一下。下次发现在处理吧。
----------------------------------------
一、Symptoms
&&&&&&& During CTAS (CREATE TABLE AS SELECT), be reported:
&&&&&&&ORA-01652: unable to extend temp segment by 1024 in tablespace &DATA&
&&&&&&& The tablespace where the object is being created doesnt have sufficient space to extend for the CTAS command to succeed.
三、Solution
&&&&&&& Modify the datafile associated for the tablespace to AUTOEXTEND ON till the CTAS command gets executed successfully.
&&&&&&&During the CTAS , it creates a&&segment in the target
tablespace and marks this segment as temporary in dictionary.
&&&&&& Once the table created successfully , the dictionary type is changed from TEMPRORAY to TABLE. In addition, if the SELECT performs a SORT operation,temporary space may be used as for the same.
四、TEST CASE
&&&&&& 1. 创建表空间
&&&&&&&&&&SQL& CREATE TABLESPACE TEST DATAFILE 'D:\ORACLE\PRODUCT\10.2.0\ORADATA\ORCL10G\TEST.DBF' SIZE 10M AUTOEXTEND OFF;
&&&&&&&&&& Tablespace created
&&&&&&& 2. 为客户分配默认表空间
&&&&&&&&&&SQL& ALTER USER TESTER DEFAULT TABLESPACE TEST;
&&&&&&&&&& User altered.
&&&&&&& 3. 查询对象实际大小
&&&&&&&&&SQL&SELECT BYTES/,TABLESPACE_NAME FROM DBA_SEGMENTS WHERE SEGMENT_NAME='DUMMY';
&&&&&&&&&&&&&&&&&&&& 11&&&&&& system&&& --Size of the DUMMY object is 11 M
&&&&&& 4. CTAS创建新对象
&&&&&&&&&&SQL& CONN TESTER/TESTER
&&&&&&&&&&&&&&&&&&&&& Connected.
&&&&&&&&&& SQL& CREATE TABLE DUMMY_123 AS SELECT * FROM SCOTT.DUMMY;
&&&&&&&&&& CREATE TABLE DUMMY_123 AS SELECT * FROM SCOTT.DUMMY
&&&&&&&&&& *
&&&&&&&&&& ERROR at line 1:
&&&&&&&&&& ORA-01652: unable to extend temp segment by 128 in tablespace TEST
&&&&& The above error message reported above is because the Tablespace TEST is of 10 M size and AUTOEXTEND OFF. The object about to be created &DUMMY_123 & , requires 11 M size and as it doesn't have enough space to extend , it has failed with the ORA-1652
error message in &TEST& tablespace.
一、Temporary Segments Concept
&&&&&&&&&often requires temporary work space for intermediate stages of database processing.
There are different kinds of temporary segments in the database.
&&&&&&& Some of them are created explicitly by the users. The others are created and accessed for the user by the system.
&&&&&& There are&&operations containing a sorting step which require temporary segments.
However, segments used for sorting are not the only segments having SEGMENT_TYPE=TEMPORARY. Temporary segments can also exist for permanent segments creation.
&&&&& Temporary segments for sorting are created in the default temporary tablespace of the user. This tablespace may be of type TEMPORARY or PERMANENT.
&&&&& (1)& A TEMPORARY tablespace (Locally Managed Tablespace) is recommended for sort operations.
&&&&& (2)& Temporary segments for permanent segments creation are created in the tablespace specified in the create statement or in the user’s default tablespace.
a.& Temporary Tables
&&&& only exists during a transaction or session.
&&&& DML statements on temporary tables do not generate redo logs for the&&changes. However,
undo logs for the data and redo logs for the undo logs are generated.
b.& Temporary LOBs
&&&& The goal of temporary LOBs is to develop an interface to support the creation and deletion of lobs that act like local variables.
c.& Temporary Segments as work area for sorting
&&&& When processing queries, Oracle often requires temporary workspace for intermediate stages of SQL statement execution.
&&&& The sort area is allocated in memory. If the sort operation needs additional memory (above the value specified by the SORT_AREA_SIZE parameter), the sorted rows are written to disk to free up the sort area so that it can be re-used for the remaining sort.
&&& Oracle automatically allocates this disk space called a temporary segment.
&&& The following statements may require the use of a temporary segment for sorting:
&&&CREATE INDEX/SELECT ... ORDER BY/SELECT DISTINCT/SELECT ... GROUP BY/SELECT ... UNION/SELECT ... INTERSECT/SELECT ... MINUS/ANALYZE TABLE/Unindexed joins/Correlated subqueries
d.& Temporary Segments for permanent segments creation
&&&& Besides sort operations, there are other SQL operations, which also require temporary segments:
&&&CREATE PRIMARY/UNIQUE KEY CONSTRAINT
&&& ALTER TABLE ... ENABLE PRIMARY/UNIQUE CONSTRAINT
&&& CREATE TABLE STORAGE (MINEXTENTS&1)
&&& CREATE TABLE AS SELECT
&&&&&&&&&& The CTAS creates a data segment in the target tablespace and marks this segment as temporary in dictionary.
&&&&&&&&&& On completion, the dictionary type is changed from temporary to table. In addition, if the SELECT performs a SORT operation, temporary space may be used as for a standard select.
&&&CREATE PARTITION TABLE
&&& ALTER TABLE ... SPLIT PARTITION
&&& CREATE SNAPSHOT
&&& CREATE INDEX
&&&&&&&&&& The CREATE INDEX statement, after sorting the index values, builds a temporary segment in the INDEX
&&&&&&&&&& once the index is completely built, the segment type is changed to INDEX.
&&& DROP TABLE&&
e.& Temporary Tablespaces
二、Introduction to Direct-Path INSERT
&&&&&&& 1. Conventional insert operations:
&&&&&&&&&&& Oracle reuses free space in the table, interleaving newly inserted data with existing data. During such operations, Oracle also maintains referential integrity constraints.
&&&&&&&&2. Direct-path INSERT operations:
&&&&&&&&&&&Oracle appends the inserted data after existing data in the table. Data is written directly into datafiles, bypassing the buffer cache. Free space in the existing data is not reused, and referential integrity constraints
are ignored. These procedures combined can enhance performance.
&&&&&&&&&&& a. During direct-path INSERT, you can disable the logging of redo and undo entries
&&&&&&&&&&& b.CREATE TABLE ... AS SELECT statement, does not have any indexes defined on it and you must define them later.
Note:If the database or tablespace is in FORCE LOGGING mode, then direct path INSERT always logs, regardless of the logging or nologging setting, such as STANDBY database.
========================================================
分享到:&&&&&&&&
阅读(2376)|&评论()|&转载&(0)&|举报
========================================================
今天鄙人有意翻出&9I
Performance Tuning&&的官方教材,看到原文:
&&Using the CREATE TABLE ... AS SELECT ... command: This command will copy acrooss to the new table all the data,but the constraints triggers ,and so on will
not be transferred to the new table.
&&但本人在自己的生产库的操作过程中,发现,只要是用as select CREATE的表,都是带有原表的CONSTRINTS....
有谁能解释一下,.
这难道是官方文件的手误???
Connected to Oracle9i Enterprise Edition Release 9.2.0.4.0&
Connected as serp01
SQL& select constraint_name from dba_constraints where table_name ='CRM_CUSTOMER';
CONSTRAINT_NAME
------------------------------
REFCRM_CUSTOMER2167
REFINV_WAREHOUSE482
REFINV_WAREHOUSE608
REFORG_EMPLOYEES0001
REFORG_EMPLOYEES1474
REFORG_ENTERPRISES1400
REFORG_ORGANIZATIONS000001
REFORG_ORGANIZATIONS2401
REFPUB_AREA_CODE379
REFPUB_CLASSIFY_CODE380
REFPUB_ENTERPRISE_TYPE_CODE381
REFPUB_INDUSTRY_CODE382
REFPUB_PAYCONDI_CODE0000001
REFTPUB_PAYMENT_CODE01
SYS_C0092306
SYS_C0092764
SYS_C0079060
SYS_C0079061
SYS_C0079062
SYS_C0079063
CONSTRAINT_NAME
------------------------------
SYS_C0079064
SYS_C0079065
SYS_C0079066
SYS_C0079067
SYS_C0079068
SYS_C0079069
SYS_C0079070
SYS_C0079071
SYS_C0079072
SYS_C0079073
SYS_C0079074
SYS_C0079075
SYS_C0079076
SYS_C0079077
SYS_C0079078
SYS_C0079079
SYS_C0079080
SYS_C0079081
SYS_C0079082
SYS_C0079083
SYS_C0079084
CONSTRAINT_NAME
------------------------------
SYS_C0079085
SYS_C0079086
SYS_C0079087
SYS_C0079088
SYS_C0079089
SYS_C0079090
SYS_C0079091
SYS_C0079092
SYS_C0079093
SYS_C0079094
SYS_C0079095
SYS_C0079096
SYS_C0079097
SYS_C0079098
SYS_C0079099
SYS_C0079100
SYS_C0079101
SYS_C0079102
SYS_C0079103
SYS_C0079104
SYS_C0079105
CONSTRAINT_NAME
------------------------------
SYS_C0079106
SYS_C0079107
SYS_C0079108
SYS_C0079109
67 rows selected
SQL& create table temp_h1 as select * from crm_customer where rownum&10;
create table temp_h1 as select * from crm_customer where rownum&10
ORA-00955: 名称已由现有对象使用
SQL& drop table temp_h1;
Table dropped
SQL& create table temp_h1 as select * from crm_customer where rownum&10;
Table created
SQL& select constraint_name from dba_constraints where table_name ='TEMP_H1';
CONSTRAINT_NAME
------------------------------
SYS_C0093440
SYS_C0093441
SYS_C0093442
SYS_C0093443
SYS_C0093444
SYS_C0093445
SYS_C0093446
SYS_C0093447
SYS_C0093448
SYS_C0093449
SYS_C0093450
SYS_C0093451
SYS_C0093452
SYS_C0093453
SYS_C0093454
SYS_C0093455
SYS_C0093456
SYS_C0093457
SYS_C0093458
SYS_C0093459
CONSTRAINT_NAME
------------------------------
SYS_C0093460
SYS_C0093461
SYS_C0093462
SYS_C0093463
SYS_C0093464
SYS_C0093465
SYS_C0093466
SYS_C0093467
SYS_C0093468
SYS_C0093469
SYS_C0093470
SYS_C0093471
SYS_C0093472
SYS_C0093473
SYS_C0093474
SYS_C0093475
SYS_C0093476
SYS_C0093477
SYS_C0093478
SYS_C0093479
SYS_C0093480
CONSTRAINT_NAME
------------------------------
SYS_C0093481
SYS_C0093482
SYS_C0093483
SYS_C0093484
SYS_C0093485
SYS_C0093486
SYS_C0093487
SYS_C0093488
SYS_C0093489
SYS_C0093490
SYS_C0093491
52 rows selected
A答:也许你有好几个TEMP_H1, 在不同的SCHEMA里.&&试试
select owner, table_name from dba_tables where table_name ='TEMP_H1';
就会一目了然
B答:这个是不可能的,用ctas从组表必然要对表加相应的约束等。。。。
C答:那些都是not null约束,其他的约束和trigger是带不过来了,严格说来not null也是约束的一种,只不过教材上把它排除在外了吧。
&&相关文章推荐
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:4261167次
积分:34865
积分:34865
排名:第130名
原创:357篇
转载:1190篇
评论:96条
(1)(2)(1)(12)(3)(25)(37)(9)(32)(19)(7)(5)(11)(26)(37)(29)(76)(26)(19)(41)(63)(76)(32)(33)(88)(41)(16)(25)(37)(73)(63)(92)(75)(120)(159)(55)(67)(13)(1)

我要回帖

更多关于 select from table 的文章

 

随机推荐