Professional Web Applications Themes

Restricting the number of rows in delete statement - IBM DB2

Removed by Administrator...

  1. Moderated Post

    Default Restricting the number of rows in delete statement

    Removed by Administrator
    Nikhil Guest
    Moderated Post

  2. #2

    Default Re: Restricting the number of rows in delete statement

    Blair Adamache <badamache2muchspam.> writes:
    > You don't have to use row_number in v8 - this syntax will work:
    >
    > delete from address where name in
    > (select name from address
    > order by name
    > fetch first 1 row only)
    Cool.

    Do we support the new goodies on Common Table Expressions too ?

    --
    #include <disclaimer.std> /* I don't speak for IBM ... */
    /* Heck, I don't even speak for myself */
    /* Don't believe me ? Ask my wife :-) */
    Richard D. Latham [email]lathamrus.ibm.com[/email]
    Richard D. Latham Guest

  3. #3

    Default Re: Restricting the number of rows in delete statement

    I don't know.

    You're probably best to install v8 Fixpak 3 and experiment (unless Serge
    steps in with some advice).

    Richard D. Latham wrote:
    > Blair Adamache <badamache2muchspam.> writes:
    >
    >
    >>You don't have to use row_number in v8 - this syntax will work:
    >>
    >>delete from address where name in
    >> (select name from address
    >> order by name
    >> fetch first 1 row only)
    >
    >
    > Cool.
    >
    > Do we support the new goodies on Common Table Expressions too ?
    >
    Blair Adamache Guest

  4. #4

    Default Re: Restricting the number of rows in delete statement

    Yes, no restrictions. This is V8 GA function btw.
    Here is DB2 FP<soon>
    DELETE FROM
    (SELECT name FROM address ORDER BY name FETCH FIRST 1 ROW ONLY);

    Come to my talk at DBM Tech in Vegas for more info :-)

    Cheers
    Serge


    Serge Rielau Guest

Similar Threads

  1. Restricting number of columns in grid
    By rahma123 in forum Macromedia Flash Data Integration
    Replies: 0
    Last Post: November 22nd, 11:14 AM
  2. Restricting Number of Logins
    By suhailh@yahoo.com in forum AIX
    Replies: 5
    Last Post: October 16th, 08:54 PM
  3. Restricting number of users for my Network CD
    By upbeatsw webforumsuser@macromedia.com in forum Macromedia Director Lingo
    Replies: 4
    Last Post: September 28th, 12:48 AM
  4. restricting number of access to cgi
    By Benjamin Goldberg in forum PERL Miscellaneous
    Replies: 0
    Last Post: July 21st, 01:44 AM
  5. Insert 100 rows in just one statement
    By David Portas in forum Microsoft SQL / MS SQL Server
    Replies: 6
    Last Post: July 1st, 12:52 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139