Can I fill a new column when creating?

Example with the employees in the HR schema table

create table jab in select * from employees;

change the table JAB Add (fun_test number not null); -> column I want to complete when creating

Is there a way to do this? I'm assuming that PL/SQL would be a way, but I don't use PL/SQL, now I wonder if I can do this SQL

One last question... Is it possible to add data to a column that is added to an existing table, adding another source of table data?

Yes - you use an UPDATE statement and a subquery to update the columns you want.

Or you can use a DEC statement to create a new table and query the data in the old table and source of all what you need to complete the additional column.

Tags: Database

Similar Questions

  • How to fill the new column with values based on the subquery

    How can I fill a new column (teamid) with the following query below, at my table dept? I'm empty/null entries in teamid collar when I run the code ff:

    ALTER table dept add (teamid varchar2 (15));

    Update dept

    define the teamid = select upper (substr (deptname, 1, 3)) | Upper (substr (Color, 1, 2)) | rownum

    of the Department;

    Want to output:

    DEPTNAME COLOR TEAMID
    SALESORANGESALOR1
    ACCOUNTINGBLUEACCBL2
    BILLINGYELLOWBILL3
    SQL> create table dept as
      2  select 'SALES' deptname, 'ORANGE' color from dual union all
      3  select 'ACCOUNTING' deptname, 'BLUE' color from dual union all
      4  select 'BILLING' deptname, 'YELLOW' color from dual
      5  /
    Table created
    
    SQL>
    SQL> select * from dept;
    DEPTNAME   COLOR
    ---------- ------
    SALES      ORANGE
    ACCOUNTING BLUE
    BILLING    YELLOW
    
    SQL>
    SQL> alter table dept add(teamid varchar2(15));
    Table altered
    
    SQL> update dept set teamid = upper(substr(deptname,1,3)) || upper(substr(color,1,2)) || rownum;
    3 rows updated
    
    SQL> select * from dept;
    DEPTNAME   COLOR  TEAMID
    ---------- ------ ---------------
    SALES      ORANGE SALOR1
    ACCOUNTING BLUE   ACCBL2
    BILLING    YELLOW BILYE3
    
    SQL> rollback;
    Rollback complete
    
    SQL> drop table dept purge;
    Table dropped
    
    SQL>
    

    ----

    Ramin Hashimzade

  • I can't rename a new folder, when I create a new folder and then rename the folder, the folder was renamed "new folder."

    original title: renaming a folder

    Hello, I have a problem with windows vista, I can't rename a new folder, when I create a new folder and then rename the folder, the folder was renamed "new folder" can you help me? to solve this problem?

    Hello, I have a problem with windows vista, I can't rename a new folder, when I create a new folder and then rename the folder, the folder was renamed "new folder" can you help me? to solve this problem?

    Only time that happens, in my limited, knowledge is... If you use a 'illegal' name, such as ":" symbol. There are symbols, that you cannot use as part of a name. When this happens, you should get a warning indicating that the name is not allowed, something to that effect. Then he returns itself back to the new folder.
    Suggest you try again with conventional names. See if it works or not.

    t-4-2

  • "windows can not find the new updates" when you click check updates

    Hello, I'm sorry for the confusion caused with my previous post. The error I got is 'windows can not find the new updates' when you click check updates. It displays a notification to install the new updates on the desktop and displays the 80072EFD error code. Please help me to get this resolved. Its 32-bit windows 7.

    OT:

    Windows

    First, update your anti-virus software and run a scan completes. Then:

    If you have not already seen it this article, it may be interesting to read through to check it out - http://windows.microsoft.com/en-us/windows/windows-update-error-80072efd#1TC=windows-7

    If it still fails to run the resolution of the problems of Internet connection (from Control Panel) and see if that finds & correcting something. More details here - http://www.dummies.com/how-to/content/how-to-troubleshoot-windows-7-internet-connection-.html

  • How to fill out the story in entity object columns when creating a new line

    Hello

    I use Jdeveloper 12.1.3 to develop an ADF Application.

    My database table that has 4 columns of audit.

    CREATED_BY

    LAST_UPDATED_BY

    I added 2 new types story available under Tools-> Preferences->-> Types of history ADF business components.

    11. created by username

    12 modified by user name

    Where are these values be saved? which file will have these details of the story newly added columns.

    Note:-I'm trying to follow the blog by Jobinesh http://www.jobinesh.com/2011/02/creating-custom-history-types.html

    Also, in the method of getHistoryContextForAttribute(AttributeDefImpl attr) of CustomEntityImpl, how I'll call columns of type story newly created?

    Also, how can I distinguish if this event is create or update?

    See you soon

    AJ

    Hi AJ,.

    the entry is stored in the %JDEV_USER_HOME%\o.BC4J\jbo.properties file (in most cases %JDEV_USER_HOME%=%APPDATA%\Roaming\JDeveloper\system[YOUR JDEV VERSION] on windows machines)

    Greetings,

    Markus

  • How to upgrade are the value of the column and the new column value created

    Hi all

    create the table xxc_temp

    as

    Select donnees_1 'AB103', 'AAA' data_2 data_3 '123', 'RED' data_4, NULL status in all the double union

    Select donnees_1 'AB105', 'BBB' data_2, '222' data_3, data_4 'BLUE', NULL status in all the double union

    Select donnees_1 'AB106', 'CCC' data_2, '333' data_3, data_4 'BLUE', the double NULL status

    create the table xxc_base

    as

    Select donnees_1 'AB103', 'AAA' data_2, '123' data_3 data_4 'RED', 'Inactive' status of Union double all the

    Select donnees_1 'AB105', 'BBB' data_2, '222' data_3 data_4 'BLUE' status 'Active' of all the double union

    Select donnees_1 'AB106', 'CCC' data_2, '333' data_3, data_4 'BLUE', 'Inactive' status of double

    I need to update the status column xxc_temp with xxc_base value of the status column and also if the user tries to insert new values/lines in the xxc_temp

    So how can I update the status column? I mean automatically set to day and also new values/lines

    I need to update only that are Inactive then these lines should be updated in the temporary table

    We can do this by using the stored function, but I need to update the new status of lines also

    Please help me

    Here's another way to do it, using VIRTUAL function column as expression to get the status of the other table

    CREATE or REPLACE FUNCTION GET_STATUS (pDATA_1 IN TANK) RETURN VARCHAR2 DETERMINISTIC

    AS

    vstatus VARCHAR2 (8);

    BEGIN

    SELECT status in vstatus FROM xxc_base WHERE donnees_1 = pDATA_1;

    RETURN vstatus;

    END;

    /

    DROP TABLE 'XXC_TEMP ';

    CREATE TABLE 'XXC_TEMP '.

    ('DONNEES_1' CHAR (5),

    "DATA_2" TANK (3).

    "DATA_3" TANK (3).

    "DATA_4' VARCHAR2 (4).

    'STATUS' VARCHAR2 (8) GENERATED ALWAYS AS (SUBSTR (GET_STATUS (DATA_1), 1, 8)) VIRTUAL

    ) ;

    INSERT INTO 'XXC_TEMP' (data_3, donnees_1, data_2, data_4))

    Select "AB103' donnees_1, data_2 'AAA', '123' data_3, 'RED' data_4 of any double union

    Select donnees_1 'AB105', 'BBB' data_2, '222' data_3 data_4 'BLUE' of all the double union

    Select donnees_1 'AB106', 'CCC' data_2 data_3 '333', 'BLUE' double data_4);

  • can Firefox open a new tab when I click on a bookmark?

    Can I get Firefox 5.01 to open bookmarks in a new tab when I click on them?

  • APEX 4.2.5 / OracleXE 11.2 g, how can I make a new column available in APEX?

    I have a request to work and added a new column in the table.

    How can I put this new field available to APEX and add it to a form of the APEX?

    Kind regards.

    -Wilfried

    Hi Wilfried,.

    Note the Source of the other elements on your form; they should be of the Type of Source - database column.  Add your new column to the shape as a new point using the same Type of Source.

    Jeff

  • Can we add a new column to a UNIQUE INDEX with out droping the same index?

    Can one please let me know how to add a new column to the UNIQUE INDEX existing on the same fall.
    DB: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production 64-bit
    Thank you.
    Mahi.

    TechMahi.com wrote:
    Can one please let me know how to add a new column to the UNIQUE INDEX existing on the same fall.
    DB: Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production 64-bit
    Thank you.
    Mahi.

    I think that its doable and I don't think that it should be feasible to all too since that would disrupt the structure of index completely. I think, you must delete the existing one to add a new column that is do a composite index.

    Aman...

  • How can I view the new lines when line is inserted in a VO in Popup

    Hi Experts,

    JDEV version 12.1.3.0

    I have a page jsff where I show the data as below. This table is read-only

    image1.jpg

    If I click on the button create.

    I open a pop-up window. During the initial loading of popup I am inserting a line at the VO. The page main jsff and popup VO are inspired by the same iterator. Screenshot below.

    Untitled.jpg

    But however I note when popup open should see the newly single line.

    But its showing an old recordi, first line of the VO.  How can I avoid showing the old line of the pop-up window. The jsff and the popup are inspired by the same iterator.

    Thank you

    Roy

    Hello

    Requirement is not like that. We must show new lines in the table. Done with the visible property of inputText in the transitional attribute value column on 'Y '.

    On insertion, I put transitional attribute as "O".

  • How can I fill a date field when the document is signed?

    I have 4 fields of digital signature in a PDF form.  Next to each signature is a field of date (format dd/mm/yyyy).  I would like it so when a user registers the signature box that fills the date next to her field with today's date, then change to read only (so it cannot be changed).

    In Adobe Acrobat 9 Pro, I have this form and it has the following fields

    Signature1

    Signature2

    Signature3

    Signature4

    DateField1

    DateField2

    DateField3

    DateField4

    Signature fields trigger a Topaz.GemSignPlus driver where the end-user will sign on an electronic signature pad.

    How do I use Javascript to detect when one of these Signature fields is populated and fill in the date in the appropriate date field?  I tried to create Boolean variables initialized as false for each field of GIS.  Then when the signature is complete, I try to change it true, but for some reason any my javascript detect that the value does nothing.

    I searched the net endlessly for this solution.  I can't believe I'm having a difficult time finding an answer.  I mean how many places you go where they ask you to "sign and date here."  Each document signature base I've ever seen also requires a date.

    In any case, here's what I have.  Functions, I have a script called JavaScript Document name populate date:

    function populatedate()
    {
    var bSignature1 = new Boolean();
    var bSignature2 = new Boolean();
    var bSignature3 = new Boolean();
    var bSignature4 = new Boolean();

    If {(bSignature1)
    DateField1.value = util.printd ("d/m/yyyy", new Date());
    }

    If {(bSignature2)
    DateField2.value = util.printd ("d/m/yyyy", new Date());
    }

    If {(bSignature3)
    DateField3.value = util.printd ("d/m/yyyy", new Date());
    }

    If {(bSignature4)
    DateField4.value = util.printd ("d/m/yyyy", new Date());
    }
    }

    In each signature field, I on the signing tab "this script is run when the field is signed:

    var bSignature1 = new Boolean (true);

    I'm changing to true see.  My thought is that if it is true that DateField1.value should print jj/mm/aaaa in her building in the Date() function.

    But maybe I do not get the correct context.  I'm new to Javascript in Adobe.

    It's a round script. Why not just use the signature signature of script to set the value of the field date? The correct syntax for this is:

    this.getField("DateField1").value = util.printd ("d/m/yyyy", new Date());

  • I can't open a new folder when I right click and say open a new folder, it says empty

    On my desk if I try to open a new folder by right-clicking and selecting folder everything is empty, even if I go into a folder and right click, he said still cannot open a new folder

    Help, please

    Hi, Brian Craig,.

    What antivirus do you use?

    You can also try the following methods:

    See the following:
    Step 1: SFC scanner on the computer to ensure that the system files are intact:
    How to use the System File Checker tool to fix the system files missing or corrupted on Windows Vista or Windows 7
    http://support.Microsoft.com/kb/929833
     
    Step 2:
     

    The Microsoft Security Scanner is a downloadable security tool for free which allows analysis at the application and helps remove viruses, spyware and other malware. It works with your current antivirus software.

    http://www.Microsoft.com/security/scanner/en-us/default.aspx

    Note: The Microsoft Safety Scanner expire after 10 days.

    Note: The data files that are infected must be cleaned only by removing the file completely, which means that there is a risk of data loss.

     
    Step 3:
    Important: This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:
    If the problem persists, import the following registry key and see if the problem can be solved.

    First of all, please refer to this article (KB) knowledge base to back up the registry key. After you back up the registry, please follow the steps below to import the registry:

    1. click on start, type Notepad in the search bar and ENTER closely.
    2 copy the following commands, and then paste them into the open window of Notepad.

    Windows Registry Editor Version 5.00

    [HKEY_CLASSES_ROOT\CLSID\ {11dbb47c-a525-400b-9e80-a54615a090c0}]

    @= "CLSID_ExecuteFolder".

    [HKEY_CLASSES_ROOT\CLSID\ {11dbb47c-a525-400b-9e80-a54615a090c0} \InProcServer32]
    @= "ExplorerFrame.dll.
    "ThreadingModel"="Apartment".

    [HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\New]
    @= "{D969A300-E7FF-11d0-A93B-00A0C90F2719}".

    [HKEY_CLASSES_ROOT\Folder]
    @= "Folder".
    "EditFlags" = hex: d2, 03, 00, 00
    "FullDetails"="prop:System.PropGroup.Description; System.ItemNameDisplay; System.ItemType; System.Size ".
    "ThumbnailCutoff" = DWORD: 00000000
    "TileInfo"="prop:System.Title; System.PropGroup.Description; System.ItemType ".

    [HKEY_CLASSES_ROOT\Folder\DefaultIcon]
    @= hex (2): 25, 00, 53, 00, 79, 00, 73, 00, 74, 00, 65, 00, 6 d, 00, 52, 00, 6f, 00, 6f, 00, 74, 00, 25,.
    00, 5 C, 00, 53, 00, 79, 00, 73, 00, 74, 00, 65, 00, 6 D, 00, 33, 00, 32, 00, 5 C, 00, 73, 00, 68, 00,------.
    65.00, 6 c, 6 c, 33, 00, 00, 00, 32, 00, 2nd, 00, 64, 00, 6 c, 00, 6 c, 2 c, 00, 33, 00, 00, 00, 00


    [HKEY_CLASSES_ROOT\Folder\shell]

    [HKEY_CLASSES_ROOT\Folder\shell\explore]
    'MultiSelectModel '=' Document '.
    "BrowserFlags" = dword:00000022
    "ExplorerFlags" = dword:00000021


    [HKEY_CLASSES_ROOT\Folder\shell\explore\command]
    @= hex (2): 25, 00, 53, 00, 79, 00, 73, 00, 74, 00, 65, 00, 6 d, 00, 52, 00, 6f, 00, 6f, 00, 74, 00, 25,.
    00, 5 c, 45, 00, 00, 78, 00, 70, 00, 6 c, 00 6f 00, 72, 00, 65, 00, 72, 00, 2nd, 00, 65, 00, 78, 00,

    65,00,20,00, 2f, 00, 73, 00, 65, 00, 70, 00, 61, 00, 72, 00, 61, 00, 74, 00, 65, 00, 2 c, 00, 2f,------.
    00,65,00, 2 c, 00, 2f, 00, 69, 00, 64, 00, 6 c, 00, 69, 00, 73, 00, 74, 00, 2 c, 00, 25, 00, 49, 00,------.
    2 c, 25, 00, 00, 4 c, 00, 00, 00

    "DelegateExecute" = "{11dbb47c-a525-400b-9e80-a54615a090c0}".

    [HKEY_CLASSES_ROOT\Folder\shell\open]
    'MultiSelectModel '=' Document '.
    "BrowserFlags" = dword:00000010
    "ExplorerFlags" = dword:00000012


    [HKEY_CLASSES_ROOT\Folder\shell\open\command]
    @= hex (2): 25, 00, 53, 00, 79, 00, 73, 00, 74, 00, 65, 00, 6 d, 00, 52, 00, 6f, 00, 6f, 00, 74, 00, 25,.

    00, 5 c, 45, 00, 00, 78, 00, 70, 00, 6 c, 00 6f 00, 72, 00, 65, 00, 72, 00, 2nd, 00, 65, 00, 78, 00,
    65,00,20,00, 2f, 00, 73, 00, 65, 00, 70, 00, 61, 00, 72, 00, 61, 00, 74, 00, 65, 00, 2 c, 00, 2f,------.
    00,69,00,64,00 6 c 00, 69, 00, 73, 00, 74, 00, 2 c, 25, 00, 00, 49, 00, 2 c, 25, 00, 00, 4 c, 00,------.
    00.00

    "DelegateExecute" = "{11dbb47c-a525-400b-9e80-a54615a090c0}".

    [HKEY_CLASSES_ROOT\Folder\shellex]

    [HKEY_CLASSES_ROOT\Folder\shellex\ColumnHandlers]

    [HKEY_CLASSES_ROOT\Folder\shellex\ColumnHandlers\ {F9DB5320-233E-11D1-9F84-707F02C10627}]
    @= "PDF Info column.

    [HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers]

    [HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\BriefcaseMenu]
    @= "{85BBD920-42A0-1069-A2E4-08002B30309D}".

    [HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\Offline files]
    @= "{474C98EE-CF3D-41f5-80E3-4AAB0AB04301}".

    [HKEY_CLASSES_ROOT\Folder\shellex\ContextMenuHandlers\ {a2a9545d-a0c2-42b4-9708-a0b2badd77c8}]

    [HKEY_CLASSES_ROOT\Folder\shellex\DragDropHandlers]

    [HKEY_CLASSES_ROOT\Folder\shellex\DragDropHandlers\ {BD472F60-27FA-11cf-B8B4-444553540000}]
    @=""

    [HKEY_CLASSES_ROOT\Folder\shellex\PropertySheetHandlers]

    [HKEY_CLASSES_ROOT\Folder\shellex\PropertySheetHandlers\BriefcasePage]
    @= "{85BBD920-42A0-1069-A2E4-08002B30309D}".

    [HKEY_CLASSES_ROOT\Folder\shellex\PropertySheetHandlers\Offline files]
    @= "{7EFA68C6-086B-43e1-A2D2-55A113531240}".

    [HKEY_CLASSES_ROOT\Folder\ShellNew]
    "Directory"=""
    "IconPath" = hex (2): 25, 00, 53, 00, 79, 00, 73, 00, 74, 00, 65, 00, 6 d, 00, 52, 00, 6f, 00, 6f, 00,------.
    74,00,25,00 5 C 00, 73, 00, 79, 00, 73, 00, 74, 00, 65, 00, 6 D, 00, 33, 00, 32, 00, 5 C, 00, 73,------.
    00,68,00,65,00, 6 c, 00, 6 c, 00, 33, 00, 32, 00, 2nd, 00, 64, 00, 6 c, 00, 6 c, 2 c, 33, 00, 00, 00
    00.00

    'ItemName"="@shell32.dll,-30396 '.
    'MenuText"="@shell32.dll,-30317 '.
    'NonLFNFileSpec"="@shell32.dll,-30319 '.

    [HKEY_CLASSES_ROOT\Folder\ShellNew\Config]
    'AllDrives '=' '
    "IsFolder"=""
    "AucuneExtension"=""

    3. After you paste the above commands, please click file on the menu, and click Save.
    4 type NewFolder.reg as the file name, choose Save the file to the desktop. Click Save.

    5. go to your desktop and double-click on NewFolder.reg. A dialog box will be pop up saying "are you sure you want to add the information in fix.reg in the registry? Click

    Yes to confirm.

    Note: Administrator privileges are required to perform the above steps. When the user account control dialog box appears, please click "continue".

    I hope this helps.

  • How can I get the best quality when creating a DVD

    Hey everybody

    I really hope you can help because I'm more frustrated. That is the problem.

    Each month, we create a DVD with all the latest trailers on them playing in video stores.


    Here are the steps that we take

    1. download the trailer for quicktime 720 p on the web

    2. We then change the first Pro CC
    3. we add a graphic overlay (its a 1280 X 720, 72 dpi TIFF) I use the CC Photoshop preset for it
    4 export the project to the h.264 (.mp4) format (flow target 7.5, 7.5 maximum Bitrate, quality use Mailhot invalidate) it comes out beautiful in HD 720 p.

    Then we open again CS6

    1. start a new chronology

    2 import our .mp4 file
    3. define our transcoding. Now, here's the problem, I tried each preset. With custtominzing, our most recent has been...

    Screen Shot 2013-08-08 at 1.27.32 PM.png
    Then go us to the author of it. But when its done, it is so blurry you can't read text on the screen. Now, I know that DVD IS NOT HD, I get it, but it must always be readable? That's the best I can get? Here are a few screenshots (sorry I had to take with my camera to the DVD and you can see how blurry.)

    DVD1.jpg

    DVD2.jpg

    Any help would be appreciated as our client is really getting annoyed with the quality. Society before us used Premier Pro and still but it came out in a most pleasant way. Im just lost here.

    Export first as MPEG2-DVD. Or something without loss to export even if you have only a compression.

  • How can I get my new password when I can't connect to the e-mail?

    I am unable to connect and they said they would send me a new password, but how am I supposed to get when I can't get into my e-mail address? I have had this for a long time and we went for a week and now I am unable to enter my e-mail address.

    may communicate with whoever was reset your email password and ask them how you get requests for reset.

  • Why Firefox will allow me to have several tabs, but not allow me to switch between tabs and can only watch a new tab when closing the previous?

    Everytime I open a new tab, it appears on the tab bar where it should, but if I click on it nothing happens, the tab does not open, and I can't switch between multiple tabs. The only way to get a new tab is to close one on that I am currently, and even then it will only open the next tab in the order of precedence, so I can't even choose which tab is next to see. This problem makes it impossible to use firefox as a research tool that requires quick change back and forth between pages in multiple tabs at the same time.

    Try Firefox Safe mode to see if the problem goes away. Firefox Safe mode is a troubleshooting mode that disables certain parameters, disables most Add-ons (extensions and themes).

    If Firefox is open, you can restart Firefox Safe mode in the Help menu:

    • In Firefox 29,0 and above, click on the menu button

      click Help

      then select restart with disabled modules.

    • In previous versions of Firefox, click on the Firefox button in the upper left of the Firefox window and click help (or click on help in the Menu bar, if you do not have a Firefox button) and click on restart with disabled modules.

    If Firefox is not running, you can start Firefox in Mode safe mode as follows:

    • On Windows: Hold down the SHIFT key when you open the desktop Firefox or shortcut in the start menu.
    • On Mac: Hold the option key during the startup of Firefox.
    • On Linux: Exit Firefox, go to your Terminal and run firefox-safe-mode
      (you may need to specify the installation path of Firefox for example/usr/lib/firefox)

    When the Firefox Safe Mode window appears, select "start mode safe."

    If the issue is not present in Firefox Safe Mode, your problem is probably caused by an extension, and you need to understand that one. Please follow the section Troubleshooting extensions, themes and problems of hardware acceleration to resolve common Firefox problems to find the cause.

    To exit safe mode of Firefox, simply close Firefox and wait a few seconds before you open Firefox for normal use again.

    When find you what is causing your problems, please let us know. This might help others with the same problem.

Maybe you are looking for