very simple SQL question

Hello

Why doesn't this work?
DELETE * FROM table;
Thank you

Or if you just want to remove all: truncate table {table name}

It comes to PREDICATES when you delete, not the names of columns in your delete.

Select! = Clear

Published by: hoek on March 26, 2009 21:18

Tags: Database

Similar Questions

  • simple sql question

    What's not here?

    Select "update lookup_Nationalities set NAME = 'Philippinien' where NAME =' |" NAME of lookup_nationalities.

    I want to have commands like update

    Update lookup_Nationalities set NAME = 'Afghanistan', where NAME = 'Afghanistan ';

    Update lookup_Nationalities set NAME = 'Belgien' where NAME = 'Belgien ';

    Update lookup_Nationalities set NAME = 'China' where NAME = 'China ';

    ....

    thanx

    Hello

    Whenever you have a problem, please post a small example data (CREATE TABLE and only relevant columns, INSERT statements), so that people who want to help you can recreate the problem and test their ideas.

    Also post the exact results you want from this data, as well as an explanation of how you get these results from these data, with specific examples.

    If you ask yourself on a DML statement, such as UPDATE, then the CREATE TABLE and you post instructions INSERT must re - create the tables as they are to the DML, and the results will be the content of the or a modified tables when it's all over.

    Always say what version of Oracle you are using (for example, 11.2.0.2.0).

    See the FAQ forum: Re: 2. How can I ask a question on the forums?

    2843667 wrote:

    What's not here?

    Select "update lookup_Nationalities set NAME = 'Philippinien' where NAME =' |" NAME of lookup_nationalities.

    I want to have commands like update

    Update lookup_Nationalities set NAME = 'Afghanistan', where NAME = 'Afghanistan ';

    Update lookup_Nationalities set NAME = 'Belgien' where NAME = 'Belgien ';

    Update lookup_Nationalities set NAME = 'China' where NAME = 'China ';

    ....

    thanx

    If you want to include single quotes inside a string literal, use either 2 single quotes inside literal, like this:

    Select "update lookup_Nationalities set NAME =" Philippinien "where NAME =' |" NAME

    of lookup_nationalities;

    or use Q-rating:

    Select Q '{update lookup_Nationalities set NAME = 'Philippinien' where NAME =}' | NAME

    of lookup_nationalities;

    Whatever it is, you don't want anything like ' | ' at the end, after the «;»

    Be careful: I bet that you do not want the output to be something like

    set lookup_Nationalities set NAME = 'Philippinien' where NAME = Sverige

    I suspect you want single-quota around Sverige, too.

  • Very Simple SQL

    Hello

    I have tables like this
    Test1
    
    Biz_id PK
    ename
    dept
    
    Test2
    
    id1 PK
    sname
    dname
    And I wrote like this Merge statement
    MERGE INTO test1 " x"
    USING test2 " y"
    ON(x.ename=y.sname)
    WHEN MATCHED THEN 
    UPDATE SET 
    x.ename=y.sname,
    x.dept=y.dname
    WHEN NOT MATCHED THEN 
    INSERT 
    (x.biz_id,x.ename,x.dept)
    VALUES
    (y.id1,y.SNAME,
    y.dname);
    And I get this error code
    Error starting at line 1 in command:
    MERGE INTO test1 " x"
    USING test2 " y"
    ON(x.ename=y.sname)
    WHEN MATCHED THEN 
    UPDATE SET 
    x.ename=y.sname,
    x.dept=y.dname
    WHEN NOT MATCHED THEN 
    INSERT 
    (x.biz_id,x.ename,x.dept)
    VALUES
    (y.id1,y.SNAME,
    y.dname)
    Error at Command Line:3 Column:11
    Error report:
    SQL Error: ORA-00904: "Y"."SNAME": invalid 
    
    identifier
    00904. 00000 -  "%s: invalid identifier"
    *Cause:    
    *Action:
    Can I get help please

    Thank you

    Hello

    user10679113 wrote:
    ...
    And I wrote like this Merge statement

    MERGE INTO test1 " x"
    USING test2 " y"
    ON(x.ename=y.sname)
    WHEN MATCHED THEN
    UPDATE SET
    x.ename=y.sname,
    x.dept=y.dname
    WHEN NOT MATCHED THEN
    INSERT
    (x.biz_id,x.ename,x.dept)
    VALUES
    (y.id1,y.SNAME,
    y.dname);
    

    And I get this error code

    Error starting at line 1 in command:
    MERGE INTO test1 " x"
    USING test2 " y"
    ON(x.ename=y.sname)
    WHEN MATCHED THEN
    UPDATE SET
    x.ename=y.sname,
    x.dept=y.dname
    WHEN NOT MATCHED THEN
    INSERT
    (x.biz_id,x.ename,x.dept)
    VALUES
    (y.id1,y.SNAME,
    y.dname)
    Error at Command Line:3 Column:11
    Error report:
    SQL Error: ORA-00904: "Y"."SNAME": invalid 
    
    identifier
    00904. 00000 -  "%s: invalid identifier"
    *Cause:
    *Action:
    

    Don't use quotation marks around the aliases x and y:

    MERGE INTO test1  x
    USING test2  y
    ON(x.ename=y.sname)
    

    If you use quotation marks to define the name, it uses case-sensitive and characters that you used.
    If 'x' (quotation marks) is a two_character name
    (1) space
    (2) small x
    but x (quote) is a name of a character
    (1) capital X

  • How to make this simple sql run faster?

    Here is a very simple sql, but it takes too long to finish as an hour or more, and the problem is in the table. It's a huge table with 17660025 lines.
    In addition, upd_dt is indexed.
    select distinct (dstn_type) from ims_ets_prty_msge where ims_ets_prty_msge.upd_dt > sysdate - 30;
    Execution plan seems to be no problem: (is 9i, and I do not think that it would not perform better if the UNIQUE HASH is used instead of SORT UNIQUE)
    -----------------------------------------------------------------------------------------
    | Id  | Operation                    |  Name                    | Rows  | Bytes | Cost  |
    -----------------------------------------------------------------------------------------
    |   0 | SELECT STATEMENT             |                          |     6 |    78 |  1409 |
    |   1 |  SORT UNIQUE                 |                          |     6 |    78 |  1409 |
    |   2 |   TABLE ACCESS BY INDEX ROWID| IMS_ETS_PRTY_MSGE        |   856K|    10M|    10 |
    |*  3 |    INDEX RANGE SCAN          | IMS_ETS_PRTY_MSGE_INDX5  |   154K|       |     2 |
    -----------------------------------------------------------------------------------------
     
    Predicate Information (identified by operation id):
    ---------------------------------------------------
     
       3 - access("IMS_ETS_PRTY_MSGE"."UPD_DT">SYSDATE@!-30)
     
    Note: cpu costing is off
    Here is some info on the table
    NUM_ROWS BLOCKS  EMPTY_BLOCKS AVG_SPACE CHAIN_CNT AVG_ROW_LEN
    17129540      455259     622           502             455278      188
    The thing is that we must make it run faster.
    And all I can think is to create a bitmap on dstn_type (low cardinality) index and partition the table using upd_dt;

    So my question would be is anyway that we can get a better response time without having to make that kind of change?
    Or is this kind of change really help?

    Any thoughts would be appreciated!

    Thank you

    Have you thought about putting an index on (upd_dt, dstn_type)?

    With the query you posted, and this index, it should be possible to use a full scan of the index, no visit to the table at all.

    A bitmap index would not be a good idea, if it is an OLTP application / table.

  • Very simple question and CVI-program

    Hello

    I just started working with CVI, and as far as I can see, the principle underlying the interaction between various components is similar as in Delphi. I made a very simple example (Application of User Interface), containing a square button and a digital. My idea was to push the button, after which the DIGITAL controller displays a number. However, I can't figure out how to build a change of the function that is executed when you press the button. I tried a double click, right click, etc, but I couldn't understand it. I hope my question makes sense.

    Have you had a look in Chapter 2 of the getting started manual?

  • How can I add two very simple Questions to a slide?

    Hello

    I would like to be able to add two very simple questions to a slide, but don't know if (or how) this can be achieved. I've explained this more in detail below:

    ====================================================================================

    Scenario of

    The slide must contain two questions:

    Question 1: with two check boxes for the options Yes and No

    Question 2: with five check boxes for options 1 2 3 4 and 5

    A button (for example named Submit) to verify the responses from users by triggering a tip Action that verifies the radio buttons that have been selected.

    ====================================================================================

    The checkbox Widget looks like it could work for this scenario, because it allows each value to be assigned to a variable. However, when you try to put in place the tip Action I couldn't see all the variables I named in the checkbox Widget.


    If anyone has done this kind of thing before and can offer advice on the best way to create custom questions, I'd appreciate any help.


    For reference, I use 8 Captivate.


    Thank you


    Ross

    I indeed used interactions of checkboxes or radio buttons many times for this kind of slides. That's why I'm confused and I first want to know if you want an answer to the second issue as well? For the first question, it is clear that you need an interaction of option buttons, I don't know if you want to allow more than one choice for the second question. Only when you need to allow more than a choice will you have the interaction of check boxes, in the other scenario, option buttons will do the trick. It makes a big difference, because the radio button widget has only one associated variable that will store the selected element. For the widget checkboxes, you need a variable for each choice.

    Maybe my blog could help clarify, you can also download a descriptive table with all interactions of CP8 training

    Advice - Training interaction - Captivate blog

    BTW, I moved this thread to the Quizzing subspace.

  • In photoshop, I imported an image and put on a transparent background.  It's a very simple picture, like a drawing done in pencil.  How can I change from black to white?  Hope I don't confuse anyone, I don't always word of things well lol.

    In photoshop, I imported an image and put it on transparent background.  It's a very simple picture, like a drawing done in pencil.  How can I change the color from black to white?  I hope that my question is not a source of confusion, that I didn't Word always good things.

    Invert

    Shortcut Ctrl + I or CMD + I

  • Create quizzes very simple function

    Greetings,

    I tried to create a very simple function that records click on the buttons "right answer" and what right answers is 3, the user is taken on a label that has fine text on this. Nothing fancy, just by clicking on text (or should it be text converted to symbol?), which increments a variable and when it == 3 it goes to a label on the timeline.

    Here is the code I have... but it doesn't seem to work...

    i = 0;

    {sym.$("ques1Yesbtn","ques2Yesbtn","ques3Yesbtn"). Click (Function ()})

    i ++ ;

    If (I == 1) {}

    Q1 = 1;

    }

    If (I == 2) {}

    Q2 = 1;

    }

    If (I == 3) {}

    Q3 = 1;

    }

    var gotoFinishedLabel = q1 + q2 + q3;

    If (I == 3) {}

    read the chronology of the given position (ms or label)

    SYM. Play ("finished");

    }

    else {}

    read the chronology of the given position (ms or label)

    SYM. Play ("quesHome");

    }

    });

    Thanks much for any help!

    AB

    You will find a demo file download here: quizz.zip - box

    A few highlights:

    (1) the scene:

    (2) an element:

    (3) code:

    Thus, a few explanations.

    County of jQuery for you:

    1. because it refers to the questions together to add click event ==> sym.$(".question").on ("click", function () {...
    2. because it returns [good] answers how much I ==> var count = sym. $(".answered") .length;

    I add 'responded' class to the element current ==> sym. $(this) .addClass ("answered"); I assumed that the answer is correct.

  • Issue of Migration cold very Simple...

    Hey guys,.

    I'm relatively new to VMWare, infact, I take the vcp - 310 exam tomorrow, lucky me!  In any case, I have a very simple question, basically I can't find all the information on how to do a migration cold or in fact if it is the right solution to my problem.  I rebuilt my server ESX (3.5) and kept the VMFS volume local orginal up thanks to its VMs located on it.  Now, I want to attach them to the newly installed ESX, I can easily create new ones and add the drive but that is not the same, for example will be difference NVRAM, VMX, etc. files.  Is "cold migration" what I'm looking for?  Or is there another way I can fix this?

    Thanks in advance for your help.

    See you soon

    Neilos

    witch hunt... Just find the data store in which the virtual machine is on, browse this data store, find the virtual computers folder and inside you will see a .vmx file.  Right click on that and choose 'Add to inventory' and follow the prompts.

  • Table VERY BIG SQL database recovery

    Hello;

    I'm recovering a very large SQL table, the table is entrys (rows) about 1.2million and is growing every day. I have no problem of recovering data of normal size of approximately 25 000 entries, but when I try to access the database it blocks my Labview and generates an error message "LABVIEW: MEMORY IS FULL. VI "SQL Read.vi" was arrested in the unknown, to a call to "Rec Fetch Recordset Data (R) .vi", anyone came across this problem or heard of this? If Yes is it possible around it without cutting it to the top of the original database table?

    Thank you
    Martin L.

    The criteria include you in a query, the fewer results are returned.

    something like "SELECT card_id FROM table WHERE Serial_number = 123" would return one of the results of the table of the identity card

  • I'm using vista, and I don't know how to download music and save to flash memory directly. heat the vista. Under XP, it's very simple.

    I use vista media player, and I don't know how to download music and save to flash memory directly. Heat the vista. XP is very simple.

    Hi bojanaana,

    You can access online stores of in windows media player. Once you do, you can download music and video files from online stores.

    For more information please visit the link below
    Shop online in Windows Media Player
    http://Windows.Microsoft.com/en-us/Windows-Vista/shop-online-in-Windows-Media-Player

    Once you download the music or video you can drag and drop the music or video on the USB drive.

    I hope this helps!

    Halima S - Microsoft technical support.
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • I need a very simple database system. I am the end user to allend users!

    Original title: database access

    I need a very simple database system. I am the end user to allend users!

    Access is rather dated, but could probably manage it if you own and that you already have a model for what you need.  Just open it and see if all the default options are what you are looking for, and it will put you in automatically:

    If this is not the case, just tell us what your needs are and I'm sure we can make a suggestion

  • I synced with my Iphone 6 various collections and works very well. Question: is there a way to get out of the photos from my phone to TV via Apple TV? Camera does this but not Lightroom app.

    I synced with my Iphone 6 various collections and works very well. Question: is there a way to get out of the photos from my phone to TV via Apple TV? Camera does this but not the App mobile Lightroom Dave

    Hello

    There is no feature that can do this in Lightroom Mobile from now.

    You can post your comments/idea here Photoshop community customer family

    Thank you

  • My 2015 Indesign is annoyingly slow, wait for wheel rotation for very simple things all the time. Is there a way that I can return to Indesign 2014 please?

    My 2015 Indesign is annoyingly slow, wait for wheel rotation for very simple things all the time. Is there a way that I can return to Indesign 2014 please?

    Hello

    Please see: -.
    http://blogs.Adobe.com/adobecare/2015/06/16/how-to-find-and-install-previous-version-of-ad obe-apps-in-cc-2015.

  • Need help very simple drawing spiral overlapping

    I'm surprised that it is difficult to search for on this form. It's a whirlwind, but it is much simpler than the ones you find on a Google search. I'm just trying to draw a very simple line representing almost in a schematic way, a whisp of smoke. Very easy to make a clumsy with the pencil. But I would like a no clumsy. My deep gratitude to all those who can show me why the solution is obvious and I'm just a dope.

    Rob

    smokeSpiral.png

    Hey Rob! Thanks for reaching out. Here is a link to a similar post which can be useful... I think that post #2 will be your best bet.

    Let me know if it helps!

    -Kathleen

Maybe you are looking for