首页 \ 问答 \ 如何对从其他模式复制的表进行分区?(How to partition a table copied from another schema?)

如何对从其他模式复制的表进行分区?(How to partition a table copied from another schema?)

我想将一个表从一个模式复制到另一个模式。 然后我想分区表。 如何对从其他模式复制的表进行分区?

从我对分区的理解,这应该工作,但我不断得到丢失的左括号错误 - 这意味着可能是语法不正确?

DROP TABLE SS_CUSTOMER;
CREATE TABLE SS_Customer AS SELECT * FROM WL.CUSTOMER
 PARTITION BY HASH(CUST_ID),
   PARTITIONS 4 
   STORE IN (USERS, USERS, CUSTOMER, CUSTOMER);

I want to copy a table from one schema into another. Then I want to partition the table. How do I partition a table that I've copied from another schema?

From what I understand about partitioning, this should work, but I keep getting the missing left parenthesis error - which means probably that the syntax is incorrect?

DROP TABLE SS_CUSTOMER;
CREATE TABLE SS_Customer AS SELECT * FROM WL.CUSTOMER
 PARTITION BY HASH(CUST_ID),
   PARTITIONS 4 
   STORE IN (USERS, USERS, CUSTOMER, CUSTOMER);

原文:https://stackoverflow.com/questions/26617373
更新时间:2024-02-24 18:02

最满意答案

示例的原始版本使用了扩展名:

GridButton extends JButton

更新版本取决于此处所见的讨论。 虽然在某些情况下延伸可能是适当的,但这里提到了一些替代方案; 客户端属性特别方便。 从网格坐标中识别按钮也很容易:

private static final int N = 5;
List<JButton> list = new ArrayList<>();
…
private JButton getGridButton(int r, int c) {
    int index = r * N + c;
    return list.get(index);
}

The original version of this example used extension:

GridButton extends JButton

The updated version was predicated on the colloquy seen here. While extension may be appropriate in some contexts, a few alternatives are mentioned here; a client property is particularly convenient. Identifying a button from its grid coordinates is also easy:

private static final int N = 5;
List<JButton> list = new ArrayList<>();
…
private JButton getGridButton(int r, int c) {
    int index = r * N + c;
    return list.get(index);
}

相关问答

更多
  • 创建Board实例并保持对该对象的引用Board board=Board.painel(); 在该实例上操作board.direita(); board.print(); board.direita(); board.print(); 类课程中direita的功能应该改变JLabel属性 删除while(true)循环。 EDT将更新swing小部件。 direita (其他移动以类似的方式制作) public void direita() { if (currentX+1 < colunas) + ...
  • 我没有使用GridLayout来推荐使用它的东西,我建议你使用TableLayout 。 我这样说是因为你的布局非常适合TableLayout的范围,在快速浏览GridLayout的文档后,这似乎是一个问题: GridLayout不支持按重量定义的重量原则。 通常,因此无法配置GridLayout以在多个组件之间分配多余空间。 另外GridLayout在ICS中引入。 你可以在这里看到使用TableLayout的布局示例: https://gist.github.com/3788301 如果您不希望表格填满 ...
  • 您需要将按钮添加到JPanel : public void addButtons(JPanel panel) { for (int k = 0; k < SIZE; k++) { for (int j = 0; j < SIZE; j++) { buttons[k][j] = new JButton(k + 1 + ", " + (j + 1)); panel.add(buttons[k][j]); } } } You need to ...
  • 此示例的原始版本使用了扩展名: GridButton extends JButton 更新版本取决于此处所见的讨论。 虽然在某些情况下延伸可能是适当的,但这里提到了一些替代方案; 客户端属性特别方便。 从网格坐标中识别按钮也很容易: private static final int N = 5; List list = new ArrayList<>(); … private JButton getGridButton(int r, int c) { int index = r ...
  • 有没有办法确定点击了哪个按钮,如何? 是。 将ActionListener添加到按钮然后在actionPerformed(ActionEvent e){...}方法中,您将使用e.getSource()方法来识别触发此方法的方法意味着按下了哪个按钮。 Is there a way to identify which button is clicked if so, how? Yes. Add ActionListener to buttons then in actionPerformed(ActionEv ...
  • 您可以使用: radioButton.setHorizontalAlignment(SwingConstants.CENTER); You can use: radioButton.setHorizontalAlignment(SwingConstants.CENTER);
  • 编辑:我终于发现我并不总是在绘制网格后访问视图所以我改变了它并且它正在工作......想通了我只是个傻瓜^^ EDIT : I finally found out that I was not always accessing the views AFTER the grid were drawn so I changed that and it's working... Figured out that I was just a fool ^^
  • 我没有测试它,但试试这个: for (int y = s-1; y >= 0; y--) { for (int x = 0; x < v; x++) { grid[x][y] = new JLabel((x)+","+(y)); world.add(grid[x][y]); I didn't test it but try this out: for (int y = s-1; y >= 0; y--) { ...
  • 根据numpy.reshape 文档 ,它返回一个新的数组对象,其中包含由参数指定的新形状(假设,新形状,数组中元素的数量保持不变),而不更改原始对象的形状,所以当你调用data.reshape()函数时,你还应该将它分配回数据,以便反映数据。 示例 - data = data.reshape( shape ) # where shape = (20,50) 另外,更改形状的另一种方法是直接将新shape分配给data.shape属性。 示例 - shape = (20,50) data.shape ...
  • 我相信标签的大小没有设置,我同意可能会让人感到困惑,Label有一个小部件大小( size与所有小部件一样)和一个texture_size ,它被设置为显示文本的实际大小,kivy没有关联这两个首先以任何特定的方式,由你来决定一个人如何影响另一个,你做了一半的工作将text_size设置为(width, None) ,这迫使纹理具有小部件的宽度,但是你错过了交易的另一部分,那就是你希望小部件与生成的纹理一样高。 要使此大小有效,您还必须为Label禁用size_hint_y,因为它位于GridLayout ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。