How to remove/delete from a mysql table

Hello!
Please can someone help me with this one; I need to remove/delete a a row in a mysql table. When I use the query below, it removes this line from other tables containing the same numbers too. I only want to remove it from this table alone
String update= ("DELETE FROM info WHERE Number = '" + Nr + "' AND week= " + week+ ");
THX

I don't understand this. You're saying that running this query removes values from other tables besides your info table? I don't believe it.
One thing I'd caution you on is using names like "info" and "number" for tables and columns. They sound suspiciously close to keywords for your database. You'd be better off using less generic, more application specific names.
But I don't think that explains the behavior you're describing. Either this is a very serious bug in MySQL or a very serious misunderstanding on your part.

Similar Messages

  • How to remove duplicates from PL-SQL table?

    Hi Gurus,
    I have a PL-SQL table with following structure
    Authors (SR_NO, Auth_Code, Change_Date, Cost)
    This tables is being populated using a cursor. But, this table may have some duplicate rows (for Auth_Code column)
    e.g
    SR_NO      Auth_Code       Change_Date                       Cost
    1               A1             14-FEB-09 08.18.47 AM          11.00
    2               A2             14-FEB-09 08.18.56 AM       2839.00
    3               A1             15-FEB-09 08.00.02 AM      1299.00
    4               A1             15-FEB-09 07.00.00 AM        789.00
    5               A3             14-FEB-09 08.18.56 AM        312.00
    6               A4             14-FEB-09 08.19.02 AM        233.00Out of the above result set I need to select the distinct Auth_Code rows for which the Change_Date is maximum (and store it into some other PL-SQL table for further processing or even deleting from this table itself will also do!)
    i.e. Out of above data A1 is duplicated and has maximum Change_Date = 15-FEB-09 08.00.02 AM.
    Hence my resultant PL-SQL Table should have below data
    SR_NO      Auth_Code       Change_Date                       Cost
    2               A2             14-FEB-09 08.18.56 AM       2839.00
    3               A1             15-FEB-09 08.00.02 AM      1299.00
    5               A3             14-FEB-09 08.18.56 AM        312.00
    6               A4             14-FEB-09 08.19.02 AM        233.00I am not that much aware of PL-SQL tables and there is no any chance of modifying the existing cursor which populates the data into this PL-SQL table.
    I guess this I need to compare each record of PL-SQL table with others, but not sure how to do that.
    Could you please help?

    HI,
    Like this?:
    Connected to Oracle Database 10g Express Edition Release 10.2.0.1.0
    Connected as hr
    SQL>
    SQL> with data as(
      2  select 1 as SR_NO, 'A1' as Auth_Code, to_date('14-FEB-09 08.18.47', 'dd-mon-yy hh24:mi:ss') as change_date,    11.00 as cost from dual union all
      3  select 2 as SR_NO, 'A2' as Auth_Code, to_date('14-FEB-09 08.18.56', 'dd-mon-yy hh24:mi:ss') as change_date,  2839.00 as cost from dual union all
      4  select 3 as SR_NO, 'A1' as Auth_Code, to_date('15-FEB-09 08.00.02', 'dd-mon-yy hh24:mi:ss') as change_date,  1299.00 as cost from dual union all
      5  select 4 as SR_NO, 'A1' as Auth_Code, to_date('15-FEB-09 07.00.00', 'dd-mon-yy hh24:mi:ss') as change_date,   789.00 as cost from dual union all
      6  select 5 as SR_NO, 'A3' as Auth_Code, to_date('14-FEB-09 08.18.56', 'dd-mon-yy hh24:mi:ss') as change_date,   312.00 as cost from dual union all
      7  select 6 as SR_NO, 'A4' as Auth_Code, to_date('14-FEB-09 08.19.02', 'dd-mon-yy hh24:mi:ss') as change_date,   233.00 as cost from dual)
      8  select * from data d where change_date = (select max(change_date) from data d2 where d.auth_code = d2.auth_code);
         SR_NO AUTH_CODE CHANGE_DATE       COST
             2 A2        14/02/2009        2839
             3 A1        15/02/2009        1299
             5 A3        14/02/2009         312
             6 A4        14/02/2009         233
    SQL>Regards,

  • TS1702 how do i delete from the startup disk? I am trying to get Mountain Lion from the App store and it says that the purchase was not complete because i need 4.06 GB space to download OS x 10.8. and to remove items from my startup disk to increase space

    how do i delete from the startup disk? I am trying to get Mountain Lion from the App store and it says that the purchase was not complete because i need 4.06 GB space to download OS x 10.8. and to remove items from my startup disk to increase space. How?
    Thanks

    You can use iCloud with 10.7.5. You do not need to upgrade to Yosemite. You should provide a minimum of 15 GBs of free space or 10% of the hard drive's capacity, whichever is greater.
    Freeing Up Space on The Hard Drive
      1. See Lion/Mountain Lion/Mavericks' Storage Display.
      2. You can remove data from your Home folder except for the /Home/Library/ folder.
      3. Visit The XLab FAQs and read the FAQ on freeing up space on your hard drive.
      4. Also see Freeing space on your Mac OS X startup disk.
      5. See Where did my Disk Space go?.
      6. See The Storage Display.
    You must Empty the Trash in order to recover the space they occupied on the hard drive.
    You should consider replacing the drive with a larger one. Check out OWC for drives, tutorials, and toolkits.
    Try using OmniDiskSweeper 1.8 or GrandPerspective to search your drive for large files and where they are located.

  • HT2476 FAVORITES menu ... How do I remove/delete from the menu?

    I accidentally dragged a folder into my FAVORITES menu ... How do I remove/delete from the menu?

    Do you mean in Finder?
    Right-click (CTRL-click) > Remove from Sidebar
    -or-
    Hold down COMMAND and drag it out of the window

  • How to run insert/update/delete from CDC Change table to target using OWB

    I am planning to set up CDC and publish CDC change table as source data into to OWB. I have come across where I am confused how to apply changes from CDC change table to target database using OWB. For i.e. change tables is containing information like
    operation$, cscn$,commit_timestamp$,xidusn$,....,list of column name
    D,12323223,8/28/2008 1:44:32PM,24,.....,list of column value that have to be deleted from target
    UO,12323224,8/28/2008 1:45:23PM,24,.....,list of column value that have to be updated in target.
    Please advice or give me some hint. Thank you.

    Hi,
    you can wait for 11gR2 with CDC integration or build most of the code outside the owb. To use CDC you must do this things (http://www.oracle.com/technology/oramag/oracle/03-nov/o63tech_bi.html):
    1. Identify the source tables.
    2. Set up a publisher.
    3. Create change tables.
    4. Set up a subscriber.
    5. Subscribe to the source tables, and activate the subscription.
    6. Set up the CDC window.
    7. Prepare a subscriber view.
    8. Access data from the change tables.
    9. Drop the subscriber view, and purge the CDC window.
    10. Repeat steps 6 through 9 to see new data.
    You can do only a few of this inside owb, most of it must be done outside.
    Regards,
    Detlef

  • How to remove pics from my 3GS...???

    How to remove pics from my 3GS..???

    Photos taken with the phone can be deleted by selecting them and hitting the little wastebasket icon in the right bottom corner.
    Photos you did sync to your phone, can only be removed by deselecting them in the photo pane in iTunes, the following sync will remove them from the phone.

  • Does anyone know how to remove images from google

    i had instagram and i didnt upload images of myself but i only used my own image in the display picture and some how it has gone on to the google image search yesterday i deleted my account but when i checked to see if my images do appear in the google images i had some really bad regrets !! i reallywant to know how i can remove pictures off the google image search  even doe this does not kind of relate thank you .

    Does anyone know how to remove vocals from an import from I tunes...a  polyphonic stereo mix ?
    If you are talking about some "Karaoke" method using Logic I'll try to offer one. Before that I must say that most of the Karaoke methods are based on reversing the Phase of one of the stereo channel and bussing or merging the stereo into Mono. The result is: killing all Pan Centered in the mix - like Main Vocal, Bass, Kick, SN ect.
    The artifacts of the Stereo FX of the main vocal will stay in the Karaoke, cause the FX is stereo etc.
    Here is the Logic Setup I can offer to try some Karaoke trick using Logic.
    1. Import a Stereo mix into a Logic Stereo track.
    2. Create another stereo track and duplicate (copy) the Original Mix region to the duplicated track.
    3. Hard Pan L/R both stereo tracks.
    4. Insert an EQ and Gainer plugins into the duplicated track (R).
    5. Set the Output select of the both tracks to a Bus and assign the new Aux Track Switch mode to "Mono".
    6. Open the Gainer plugin and thick the "Phase Invert" Right button.
    7. To keep the "lowend" instruments like the bass and kick, open the EQ plugin and enable the Low Cut filter and try some Hz settings 80-115, or different Q which will sounds better for your Karaoke.
    P.S Click the image below to show its real resolution!
    Regards,
    A.G
    ======================================
    www.audiogrocery.com
    Author of: Logic GUI Deluxe(Free), Vox De Bulgaria s.a.g.e vocal pack for RMX, Logic Snapshot Console, RMX Power CTRL - Logic Environment Midi editor for Stylus etc.
    ======================================

  • How to remove text from .swf animation?

    how to remove text from .swf animation? Can no find this text
    in fla file. Flash 8.

    exactly what 'text' are you referring to? text that you typed
    on the Stage using the 'textTool'? simply select the text with the
    'arrowTool' and hit delete.
    If you are referring to a textField that you want to
    eliminate after a certain amount of time, within your animation
    sequence. first copy the text, create a new layer, paste the text
    in place, then where you want to have the text 'disappear' insert a
    'blank keyframe' at that point in the text layer.
    OR place the textfield within a MC and remove it with code.
    OR if the text is dynamic and you wish to use the position at a
    later time, pass a value of null or and empty string to the field
    at the point you wish. And there are other ways still. :) hope one
    of these works for you.

  • Making a jtable auto updates itself from a mysql table

    Pretty much what the title says. How can i auto update the jtable for every time my mysql table is updated in anyway? i am implementing this auto update function in my admin program which displays a list of users who are online etc. from the moment a user is offline/online or changes other details displayed in my jtable, i want it to auto update the jtable as soon as the actual mysql table has been updated with new data...
    I was thinking of re doing the whole jtable i made and create a thread for that table that has a infinite while loop that keeps repainting the jtable with the new updated data from a mysql table query eg select * from table and store the data into a resultset which then gets transferred into a vector. Load the vector into the jtbale and their ya go�.
    what you think of this approach? Is their a better way to do this?
    at the moment, as soon as my application opens, the jtable views all the data from my sql table, however if it doesnt auto updates itself, cheers

    i am implementing this auto update
    function in my admin program which displays a list of
    users who are online etc. from the moment a user is
    offline/online or changes other details displayed in
    my jtable, i want it to auto update the jtable as
    soon as the actual mysql table has been updated with
    new data...Well you can make some changes to make implementation easy
    Ex: Create a table to keep a log of the changes in the system the dmin program read the log and replicate the changes as specified in the log on the table model.
    When reading the log the admin program keep track of the sequence no of the last read log entry and it reads ony the entries which has larger seq numbers than the last read seq no
    I dont think that it is critical to make this to be cloase to real time. An Update once a 1 or 2 secs should be sufficient.

  • How to remove myself from/leave a team?

    Hi
    I'm using Visual Studio Online in my software development classes. The problem is that the "Accounts list" on my Visual Studio Online portal is crowded with projects from past years. A clean-up is needed.
    I found this solution (https://social.msdn.microsoft.com/Forums/vstudio/en-US/80057697-38d7-4161-8564-13c630943484/vs-tfs-online-how-to-remove-myself-from-a-team-?forum=TFService), but the problem in order to apply it is that I have no more contact with
    a lot of those students + most of their accounts are expired.
    How can I solve this?
    Thanks in advance!
    Evert
    PS: my apologies for any linguistic mistakes... English isn't my mother tongue.

    Hi Evert,
    Based on your description, seems you're the owner of the Visual Studio Online account. If you want to remove your account from the teams that expired, then you can delete the teams directly in team project administrative page of team web access.
    If you only want to remove your account from the teams, then you can click the team and remove your account in administrative page.
    Best regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to remove items from iPad home screen?

    How to remove items from iPad home screen?

    Press and hold any of the apps and after a couple of seconds or so they should start to shake. Then press the 'x' in the left corner to delete the ones that you don't want, and when you've finished deleting press the home button so as to stop the shaking. If you don't get the 'x' on any of the apps that you've downloaded (you can't delete built-in apps) then check that Settings > General > Restrictions > Deleting Apps isn't set 'off'

  • How to remove items from my reading lists on my ipad?

    how to remove items from my reading lists on my ipad?

    Swipe across its name in the list and it should get a Delete button on it - tap that and it should be removed from the list

  • How to remove item from my iPhone and iPad on my reading list?

    How to remove item from my iPhone and iPad on my reading list?

    Swipe across its name in the list and it should get a Delete button on it - tap that and it should be removed from the list

  • How to remove songs from ipad ios 5.1.1?

    My kids loaded songs on my ipad with their accounts.  Every time I log on I am prompted for their Apple IDs.  I want to remove the songs.  How??

    Hi Zimmer1956, 
    The process of deleting songs on your iPhone and iPad are the same by going to the songs that you do not want and swiping left over the song to bring up the delete option. Take a look at the article below for more information on how to remove music from your devices. 
    How to delete content you've downloaded from the iTunes Store, App Store, iBooks Store, or Mac App Store
    http://support.apple.com/en-us/HT5772
    Let me know if this helps or if you need further assistance,
    -Norm G. 

  • How to remove songs from iPad?

    I've read several threds from users asking how to remove songs from the iPad 1.0, but have not found anyone with the symptoms mine has.
    For some unknown reason, the checkbox next to each song to remove them from the iPad is disabled.
    My latest attempt at removing all of the music was to tell iTunes to "Sync Music" with "Entire Music Library' selected.  That caused iTunes to push all 2700+ songs to the iPad.  I checked to see if I could remove the songs from the iPad by de-selecting the checkbox, but the checkbox was still disabled.
    So I told iTunes to stop syncing Music.  I acknowledged the warning message that this would remove all songs from the iPad.  Perfect - remove everything and I'll manually add the songs I want to put back on.  However, the results were not what was intended... I am back to where I started:
    When I open "Music" on my iPad, it shows lots of albums and songs (over 2700).
    When I view my iPad using iTunes, "Sync Music" is disabled and the capacity indicator shows 11.1GB of space allocated to audio files.
    When I view my iPad's Music folder using iTunes, it shows only 3 albums.
    At this point, I am thinking my only option is to wipe the iPad and manually add everything back on.  I'd rather not do that... but am out of options I can think of.

    I cannot delete music from my iPad2.  I've gone into iTunes and selected to manually manage my music.  When I click on my iPad and then MUSIC, I don't see any songs listed.  When I look at my iPad itself under usic there are a ton there.  I just want to keep my iPad free of music.  I don't need my music on my phone and my iPOD (yes, I still use an iPOD and I still like my music SEPARATE.)
    HELP
    Thanks.
    PS:  I'm using iTune 11.1.3.8
    iTunes software and iPad software up-to-date

Maybe you are looking for