How to create a table with two unique columns

How to create a table with two unique columns. I use the following syntax below and I get the error message such unique or primary key already exists.

create the table COPQ_WORKCELL_GOAL
Type_id varchar2 (4) NOT NULL UNIQUE,
Tyle_Location varchar2 (30) NOT NULL UNIQUE,
Type_Description varchar2 (20).
KEY elementary SCHOOL (Type_id)

Use 1 or the other column type_id;

  Type_id varchar2(4),
  Tyle_Location varchar2(30) NOT NULL UNIQUE,
  Type_Description varchar2(20),
  PRIMARY KEY (Type_id)

Table created

Table dropped
  Type_id varchar2(4) primary key,
  Tyle_Location varchar2(30) NOT NULL UNIQUE,
  Type_Description varchar2(20)

Table created

Tags: Database

Similar Questions

  • How to create a table with these dimensions?

    Still new in Indesign, but I need to create a table like the one below.

    Screen Shot 2015-03-10 at 2.31.25 AM.png

    Select the text tool, I created a block of text and then insert a table. However, I'm lost as to how to change the top line for the length of the two columns from the bottom.
    I looked at the options of panel paintings, but it only allows me to change the number of lines and columns.

    All advice is appreciated. Thank you.

    You must create a table with two rows and two columns.

    To select the first line and click "merge cells".

  • 5.6.1 pages: How to create a table with more than 999 lines?

    5.6.1 pages: How to create a table with more than 999 lines?

    The table on Pages v5.6.1 line selector is limited 3-digit, as it is in Pages ' 09 v4.3. Either use LibreOffice Writer, who does not have any constraint line on processing tables 3-digit, or any application spreadsheet for top 3-digit row needs.

  • How to create a table with no lines to the left or to the right?

    If I create a table with say 5 columns and 15 lines, how not to do a vertical line (border) to the left and to the right of the table while keeping the boundary up and down? Is that possible or I just put a white box on the left and the right?


    There are a few methods that work. Here is one.

    (1) select your table cells

    (2) open the race Panel

    3) click the blue lines of the proxy image in the Panel of stoke to deselect the lines inside and high and low lines

    (4) 0 the value of the weight of the race (or change the color of the None swatch)

    Oh and for the love of your fellow designers or the person that allows you to edit your work in the future... do NOT use a white box to hide the traits of lines and columns in the table.



  • How to create a table with muse?

    How can I create a table with muse?

    Muse do not support building tables at this time.

    However, you can add HTML table to the object-> the option Insert HTML code as a way to get around this.

    You can even try lining up a few text boxes with or without contour applied to create a tabular look editable in design mode.

    Thank you


  • How to create a table with editable column values.

    Hello world
    I think it's very simple, but I am unable to find how to do this. This is my requirement. I need to create a table with n columns and 1 line initially. the user must be able to enter data into this table and click of a button must insert the data into the database table. Also, there should be a button at the bottom of the table to add 1 line to the table.

    I know how to do the insertion of data, but can someone please let me know how to create a table which allows the user to enter data and how to create a line button Add 1?

    Thanks in advance!


    Go through the tutorial of Toolbox Page & Advanced section of the Guide of the OFA table.

    Step 1 - you need to create EO & VO from this EO. This EO will be table of database where you want to insert the data.

    Step 2 - create an advanced table region. (See this section in table advanced for more details)

    Step 3 - attach this VO in the BC4J region advanced Table component.

    Kind regards

  • How to create a table with auto-numbering?

    I want to create a table with a default value of column to the increase in whole number. The first thought came to me, is to use the sequence. I find in google than following create statement
    create table etl_stats1 (run_time date,arr_rows int,lid int default nextval('etl_req'));
    get ORA-04044: procedure, function, package or type is not allowed here.

    There are discussions described here uses the trigger to do the job. But that does not support by default in a sequence, it seems so average.

    You must create a sequence and a trigger:

    SQL> create table etl_stats1 (run_time date,arr_rows int,lid int)
      2  /
    Table created.
    SQL> create sequence etl_seq;
    Sequence created.
    SQL> create or replace
      2    trigger etl_stats1_bir
      3    before insert
      4    on etl_stats1
      5    for each row
      6    begin
      7        select etl_seq.nextval into :new.lid from dual;
      8  end;
      9  /
    Trigger created.
    SQL> insert into etl_stats1 (run_time,arr_rows) values(sysdate,99)
      2  /
    1 row created.
    SQL> select * from etl_stats1
      2  /
    RUN_TIME   ARR_ROWS        LID
    -------- ---------- ----------
    15:38:41         99          1


  • How to create multiple tables with SQL commands

    Hi, first of all, is it possible to create a table and then one more both with SQL commands?
    because I tried to do this in the following way
    CREATE TABLE 'HB_Product')
    "productId" number 4 NOT NULL.
    "productName" VARCHAR2 (20) NOT NULL,
    "prodPricePerTon" NUMBER (10,2).
    "HB_Product_PK" PRIMARY KEY CONSTRAINT ("productId")
    CREATE TABLE 'HB_Operations')
    "orderNo" NUMBER (5) NOT NULL,
    'lineNo' number 4 NOT NULL.
    "billNo" NUMBER (10) NOT NULL,
    'actions' VARCHAR2 (15).
    'place' VARCHAR2 (15).
    "actDate" DATE NOT NULL,
    "totWeight" NUMBER (6.3).
    'HB_Operations_PK' CONSTRAINT PRIMARY KEY ('lineNo')

    I copied some of the syntax for creating the table object browser, but I preffer to use my own sql.
    It gives me an error "Missing or option not valid."

    Can someone explain to me how to do it properly, or why it is not possible?

    Best regards from Stan!

    862377 wrote:
    so you're saying I can't do several tables at the same time?

    Yes... Well,... not this way

    You can do this way

    create schema authorization alex
    CREATE TABLE "HB_Product" (
    "productId"    NUMBER(4) NOT NULL,
    "productName"    VARCHAR2(20) NOT NULL,
    "prodPricePerTon"    NUMBER(10,2),
    CONSTRAINT "HB_Product_PK" PRIMARY KEY ("productId")
    CREATE TABLE "HB_Operations" (
    "orderNo"    NUMBER(5) NOT NULL,
    "lineNo"    NUMBER(4) NOT NULL,
    "billNo"    NUMBER(10) NOT NULL,
    "actions"    VARCHAR2(15),
    "place"    VARCHAR2(15),
    "actDate"    DATE NOT NULL,
    "totWeight"    NUMBER(6,3),
    CONSTRAINT "HB_Operations_PK" PRIMARY KEY ("lineNo")

    The question is: why do you want to create "at the same time? What is the harm in creating one after the other?

    some tips (maybe not desired):
    do not use quotation marks in your statement, this will create column names and the table out.

  • How to create a table with lines in a line?


    I am trying to create a table that looks like this: but I can't understand.

    Please can someone tell how should I go about this?

    Thanks for the help.


    We see you the nested tables, you must create a table within a table. For this first you must merge the lines and insert a table with the number of rows requested. You can find the example created for you below and let me know in case of any problems * o4IZIVfpKgqOTbX8OQ

    Thank you

  • How to create the table with the rows and columns using the layout?

    One of my friends advised me to put my site on the mode of provision as it is better than the standard as he said
    but I couldnot make an ordinary table with the rows and columns in mode available th
    y at - there someone who can tell me how to?
    Thank you very much

    Wednesday, April 18, 2007 21:01:38 + 0000 (UTC), "Mr.Ghost".

    > A friend of mine advised me to put my whole site on the mode of disposal as its
    > better than standard, as he says

    Your friend won't. Don't listen to him any more. Mode of disposal creates
    very fragile and rigid code pauses at the first opportunity.


  • How to create the table with the description of the table


    I would like to create the array with the description of the table (such as the creation of package or procedure with comments).

    Is it possible to achieve thanks to the oracle, if possible please help me achieve this goal.

    Thank you and best regards,

    Ibrahim Sayyed.

    > create table test (col1 number);

    > comment table test is "about a comment ';

    > select comments from user_tab_comments where table_name = 'TEST ';

    This is a comment

  • How to create the table with value list/map binding

    I need to display some values in a tabular format. It is possible to create a table adf without having value binds to a VO object. I can make a table with a combination of list/map.

    I want to change the format of display with minimum change in the application. I therefore seeks a change to a list/map and map with the table.

    Here is the structure in that I need to post.

    |     | Header1. Tete2 |
    | Txt R1 | value 1. Value 2.
    | Txt R2 | Value 3. value 4.

    All views is completely irrelevant. So I should not create a VO and add the VO object lines.

    Published by: yannick June 10, 2011 11:34

    Yes, you can do it. Create a pojo with properties (column) that you want to display in the table and create a list of instances of the POJO and then you can fill your table using the list.


    public class SamplePojo {
    private String col1;
    private String col2;
    public SamplePojo(String col1, String col2){
      this.col1 = col1;
      this.col2 = col2;
    //add setter and getter methods
    //Inside bean, prepare a list with pojo instances (Assume a getter exists for pojoList)
    pojoList = new ArrayList();
    pojoList .add(new SamplePojo("Value1", "Value2");
    pojoList .add(new SamplePojo("Value3", "Value4");
    //Inside jspx

    Jean Lou

  • How to create a table with a variable

    Hello world!

    I have a procedure that receives a table as parameter name and need to create a table using this name

    For example:

    PROCEDURE REFRESH_REPORTS (table_name varchar2) IS

    table_name_REPORT: = table_name;

    run immediately "create table table_name_REPORT...

    But I don't get this job. I'm just add this procedure as part of a package that is used for online/web declarations.

    Could someone guide me how can I create this table?

    I was getting errors such as invalid table name, and I even tried to use a variable that stores the SQL full and concatenated to the name of the table variable, but still that didn't work.

    Thank you so much in advance.


    Published by: user645399 on January 20, 2010 21:42

    You need create a valid SQL statement in the string. And if you want to add variables in this chain, do you this through the concatenation or replacement.

    For example using concatenation

      tableName varchar2(30);
      sqlCreate varchar2(1000);
      tableName := 'funky_foo';
      sqlCreate := 'create table '||tableName||' as select * from [email protected]';
      -- using dbms_output to enable the display of the SQL that is about to be executed
      execute immediate sqlCreate;

    For example using replacement (better option than the SQL syntax is more easily readable and maintainable and allows several variables to set in the SQL model)

      SQL_CREATE_TEMPLATE constant varchar2(1000) :=
    from [email protected]';
      tableName varchar2(30);
      sqlCreate varchar2(1000);
      tableName := 'funky_foo';
      sqlCreate := replace( SQL_CREATE_TEMPLATE, '$TABLE', tableName );
      -- using dbms_output to enable the display of the SQL that is about to be executed
      execute immediate sqlCreate;
  • How to create a table with strings active by Boolean button

    I have a problem to create a table and did not find any topic in the forum that could help me solve this problem.
    I need to create a table of alarm.
    In other words, every time an alarm has been triggered (Boolean button), the table shows the time, date and where the alarm has occurred.
    For example, when garage alarm is activated, it will be at table:

    Date / / Time / / Garage / / presence ON

    And so on, when the alarm is activated the room:

    Date / / Time / / room / / presence ON

    If anyone can help, I would appreciate it enough.

    Thank you.

    Giuliano06 wrote:

    So I can show the alarm, but when the button is not selected, it sends the null value (empty string) for the table through the registry to offset.

    Also, when I choose for example the 2 bedrooms, it is moved to another column in the table and not just below the last alarm obtained.

    My VI is attached cases someone might have an idea.

    your constantly questioning the value to your table, ofcoarse, this vi is designed according to the mechanical action of the Boolean switch...

  • Create the table with aliases for columns


    I don't know if its possible, but how do I define aliases for columns when I create a table (in fact, a global temporary Table - TWG)? The idea is to select the column using its name or its alias, like this:

    SELECT nom_de_colonne FROM mytable


    SELECT alias_de_colonne FROM MaTable

    I work with Oracle9i Enterprise Edition Release

    Thanks in advance.

    You do not define aliases when you create a table, when you choose him.

    I have to say... When you use it in a SQL statement (not just select).

    Published by: SomeoneElse 18 Sep, 2008 15:10

Maybe you are looking for