How can I use the SQL to create a primary key for a existing table?

create table a(bm number,mc varchar2(20));
when the table was created,i want to make the column bm as
the primary key and my SQL is "alter table a enable primary key bm",the system show
me error,how can I write the right one?

create table a(bm number,mc varchar2(20));
when the table was created,i want to make the column bm as
the primary key and my SQL is "alter table a enable primary key bm",the system show
me error,how can I write the right one? You do not have any primary key defined on your table yet, so, it does not make sense to enable it (if at all possible) !
You need to add PRIMARY KEY using something like this:
SQL> alter table a add constraint pk_a_bm primary key (bm) ;

Similar Messages

  • How can I use the color adjustments interface that shows up for camera RAW on jpeg files?

    How can I use the color adjustments interface that shows up for camera raw on other files types? The HLS controls had the secondary color adjustments (6 colors instead of the 3). Plus, it had same vibrancy and a better Curves interface. Yesterday was the first time I imported raw into Photoshop CS5 and I got that really cool interface. What is that? Can I use that on other file formats?

    Actually I am using the Tradional Chinese Version, when I try to edit the jpg file with camera raw, the system shows that there is no camera raw plug-in. The cmaera raw never work.

  • How can I use the FTP server on Oracle XML DB for plain text files?

    Hi,
    I need to generate comma separated files for download via FTP. The files are generated from Oracle Table data and should be published on a FTP Server. Would it be able to use the FTP Server on Oracle XML DB?
    If not, any suggestions?
    Thanks
    Frederik Christensen

    You can create a temporary CLOB with your CSV content, and then folder the CLOB into the XDB repository with DBMS_XDB.createRESOURCE()...
    This would work fine....

  • How can I use the 4G monthly plan as a backup for WiFi access

    I plan to get an Ipad that I will mostly use with wifi but it would be nice to switch to 4G on rare occasions when wifi is not available.  If I sign up for the monthly 4G prepaid do I have to pay for months when I don't use it?  The contract language in Verizon's brochures seems to suggest I do but I a rep in one of their stores said the opposite.

        We appreciate your interest in utilizing 4G prepaid data for your device WISE1049-5319! Please contact prepay support activations at 877-777-5759. I'm sorry we only support postpaid service here.
    JonathanK_VZW
    VZW Support
    Follow Us on Twitter@VZWSupport

  • How can I use the iPhone 4S with no SIM card?

    How can I use the 4s with
    no SIM card
    Just for photo and internet

    Using an iPhone without a wireless service plan - Support - Apple

  • How can i use one SQL statement to solve problem?

    How can i use one SQL statement to solve the question below?
    For a Table named A, there is a column named F(char type).
    Now select all the records where F like '%00' and update their F value to '%01'
    Just one SQL statement.Do not use PL/SQL block.
    How to do that?
    Thanks.

    What is the data volume for this table?
    Do you expect lots of rows to have '%00' as their value?
    Following two statements come to mind. Other experts would be able to provide better alternatives:
    If you have index on SUBSTR(f, 2):
    UPDATE A
    SET    f = SUBSTR(f,
                      1,
                      length(f) - 2) || '01'
    WHERE  substr(f,
                  -2) = '00';If most of the rows have pattern '%00':
    UPDATE A
    SET    f = SUBSTR(f,
                      1,
                      length(f) - 2) ||
               DECODE(SUBSTR(f,
                             -2),
                      '00',
                      '01',
                      SUBSTR(f,
                             -2));

  • How can I use the print module to print different size images on one large "canvas"?

    How can I use the print module to print different size images on one large "canvas"? An example would be in Photoshop, go to file>new, and create the size paper I want, and move images of different sizes onto it.
    I was thinking the print module would do this automatically for me.

    You can't, at present. It's been a requested feature, so we'll see if it shows up in a future version, but it's not there at present.

  • How can I use the "Copy and paste" tool in order get stamps in the same position in different pages (Acrobat XI for PC)?

    With Acrobat 6.0 I was able to copy a stamp in the same position (I mean "exactly" the same one) of different pages just by using the "copy/past" tool.
    Now I am using Acrobat XI and it seems like it is not possible anymore: I am copying a stamp and I am trying to past it in anoter page, but it appears in the center of the page (or wherever it wants to...).
    Does anyone have a solution?
    Thanks in advance.

    Thank you very much. I'll be waiting for you message.
    Messaggio originale----
    Da: [email protected]
    Data: 26/01/2015 17.56
    A: "Umberto Gangi"<[email protected]>
    Ogg:  How can I use the "Copy and paste" tool in order get stamps in the same position in different pages (Acrobat XI for PC)?
        How can I use the "Copy and paste" tool in order get stamps in the same position in different pages (Acrobat XI for PC)?
        created by Gilad D (try67) in Creating, Editing &amp; Exporting PDFs - View the full discussion
    Well, I was in the same situation so I've developed a tool that allows one to do it. I will send you some additional information about it in a private message.
         If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7132586#7132586 and clicking ‘Correct’ below the answer
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7132586#7132586
         To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, &amp; "Stop Following"
         Start a new discussion in Creating, Editing &amp; Exporting PDFs by email or at Adobe Community
      For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • I was trying to get the iOS 8.2 on my iPhone 5 but then it stopped and my phone is now on recovery mode I have pictures I need and they did not all fit on iCloud  how can I use the phone again with ALL my pictures and videos without restoring it?

    I was trying to get the iOS 8.2 on my iPhone 5 but then it stopped and my phone is now on recovery mode I have pictures I need and they did not all fit on iCloud  how can I use the phone again with ALL my pictures and videos without restoring it?

    Contacts are designed to be synced to a supported application on the computer or a cloud service.
    Pictures taken with the device are designed to regularly be copied off the device to a computer as would be done with any digital camera.
    If you have failed to use the device as designed it may be too late to recovery anything.
    Is the device regularly backed up to a computer via iTunes?  If so, the most recent backup (when restored to a replacement iOS device) should contain all contacts and pictures as of when the backup was created.

  • To test how can we use the opt  'logical file name' to name the file based

    Hi Sir/Madam,
               to test how can we use the opt  'logical file name' to name the file based on the selection made in the dtp run for extracting data as flat file.

    Hi Vishali,
    In the DTP select the file location as application server and give the logical file path. The actual file and logical path can be created using transaction "FILE" and "AL11".
    Rest of the process is same as that of extraction from local file.
    Regards,
    Durgesh.

  • How can utilize/use  the extended space in system.img ?

    Hello Guru's
    In Oracle VM , How can utilize/use the extended space in system.img ?
    a) Increased the system.img size using the following command:
    # dd if=/dev/zero bs=1M count=12960 >> /OVS/running_pool/18_test1/System.img
    b) Verified the added size of system.img file at OVS server.
    # ls -lh System.img
    -rw-r--r-- 1 root root 19G Feb 9 20:58 System.img
    c) Started GVM and additional size/memory is not shown ?
    # df -m
    Filesystem 1M-blocks Used Available Use% Mounted on
    /dev/xvda2 3984 2292 1652 59% /
    /dev/xvda1 92 12 75 14% /boot
    tmpfs 512 0 512 0% /dev/shm
    + Tried working with resizefs , resize2fs , cmd did not work.
    (GVM is created using Oracle provided template)
    + am i missing anything ?
    Oracle VM Setup Detail:
    oracle-logos-4.9.17-7ovs
    enterprise-linux-ovs-5-0.17
    ovs-release-2.2-0.17
    ovs-utils-1.0-33
    kernel-ovs-2.6.18-128.2.1.4.9.el5
    ovs-agent-2.3-29
    Thanks in advance for your help.
    Best Regards
    Basu

    I am not positive what you did is going to work, but it seems like you did the equivalent of imaging a small disk on a bigger disk. In that case, the first thing to do is update the partition table with fdisk. Start with fdisk -l in the vm for general information about the disk. Hopefully, the additional space will show. Then, work with fdisk to use the extra space. The easiest is to add a partition, then a file system on it. It is also possible to expand the last partition (you might have to delete it first), then expand what is on it (may be RAID, LVM, or the file system), layer by layer. As usual with fdisk, you run the risk of thrashing it all, so you may want to practice on a copy first. Obviously, the extra space can only be added to the last partition of the small disk.
    If the situation is more complex, you may have to boot a VM with both the small disk and the big disk at the same time. If you boot the VM off of an iso DVD image, you can then shell out, then run fdisk to partition the big disk the way you want, then use dd to copy the partitions you want in the order you want from the small disk. I am pretty sure not all combinations will work, but you get the idea. You can then take the small disk out, and boot off of the big disk.
    Come to think of it, you might just be better off with adding more space as a second virtual disk. You would then be free to partition/format it the way you want without messing with the first disk. Linux is so good with disk management, so many options.
    As a general statement, though, I like to put some distance between the high level file systems and the low level disk partitions, so I use LVM (Logical Volume Manager).
    Best of luck, keep us posted.

  • How can i use the boolean AND here?

    Hi,
    how can i use the boolean expression AND in order to include it in the expression below so as that 2 condition must be true in order to get the respective data from the database?
    java.sql.ResultSet res = statement.executeQuery("SELECT * FROM station9 " + "WHERE P =" + power);
    regards

    java.sql.ResultSet res = statement.executeQuery("SELECT * FROM station9 " + "WHERE P =" + power + " AND FLAVOUR = " + raspberry);

  • How can I enable the ability to create links when editing site text in BC?

    I am about to launch my first BC site for a client. I built the site using Muse. The client needs to update text and pics on their own using BC, which is fine, but when editing text, they are unable to create a link to another page. How can I enable the ability to create links when editing site text in BC? I can apparently do this in this post, but I don't see a way to do this for their site.

    Grid control should be used if you have multiple dbs to manage.
    But if you still want to install dbconsole, you can use dbca as already mentioned. it's much easier to do that using dbca.
    With the manual method, you create the repository via emca -repos create.
    Then you configure it using emca -config dbcontrol db. This will ask for sys passwords, ports setting etc...

  • How can I use the old Apple TV with new iTunes?  It tells me to input a code in iTunes but iTunes no longer has a spot to input this code to allow sync.  I can access the iTunes Store fine, just none of my Library

    How can I use the old Apple TV with new iTunes?  It tells me to input a code in iTunes but iTunes no longer has a spot to input this code to allow sync.  I can access the iTunes Store fine, just none of my Library

    read this
    https://discussions.apple.com/message/20429789#20429789

  • How can I use the QR codes with my iPad 2. do I need to download first an app ?

    How can I use the/read the QR codes with my iPad 2 ? Do I need to download an app ?

    Yes.  There are quite a few available for free in the app store

Maybe you are looking for