Professional Web Applications Themes

Repositioning a Column - Microsoft SQL / MS SQL Server

How do I reposition a column through SQL (Without using enterprice manager). In a table I have a column ServiceID at column number 5, How do I move it to column 2 Thanks...

  1. #1

    Default Repositioning a Column

    How do I reposition a column through SQL (Without using enterprice manager).

    In a table I have a column ServiceID at column number 5, How do I move it to
    column 2


    Thanks




    Kartic Guest

  2. #2

    Default Re: Repositioning a Column

    Drop and re-create the table in the specified order (this is exactly what
    Enterprise Manager does).

    Or, create a view which references the columns in the order you like.

    Column order shouldn't really matter, because all of your SELECT queries
    should be referencing column names, so you can dictate the order at query
    time without worrying about how it's defined in the DDL.




    "Kartic" <kghoshcsystemssoftware.com> wrote in message
    news:eRV0oSkRDHA.1972TK2MSFTNGP11.phx.gbl...
    > How do I reposition a column through SQL (Without using enterprice
    manager).
    >
    > In a table I have a column ServiceID at column number 5, How do I move it
    to
    > column 2
    >
    >
    > Thanks
    >
    >
    >
    >

    Aaron Bertrand - MVP Guest

Similar Threads

  1. Column chart need column to exceed axis maximum value
    By zanedev in forum Macromedia Flex General Discussion
    Replies: 2
    Last Post: May 8th, 04:26 PM
  2. Repositioning camera to wanted distance
    By VonCede in forum Macromedia Director 3D
    Replies: 3
    Last Post: September 11th, 08:03 PM
  3. Bound Column or Template Column (w dAdapater?) in DataGrid
    By Ravichandran Mahalingam in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: January 9th, 03:30 PM
  4. Convert an MS Access Yes/No column to a checkbox column in C# datagrid
    By Gregory Rampton in forum ASP.NET Data Grid Control
    Replies: 0
    Last Post: August 6th, 04:09 PM
  5. Replies: 0
    Last Post: July 7th, 08:32 AM

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