![]() |
| Table Aesthetics / Column Sort Order |
|
cbsinet.com
|
I've always used a table creation interface like the one in InterDev, which I liked most, or the one in SQL Server Enterprise Manager. I've recently started creating my tables through the query analyzer because loading the list of databases from the tree in Enterprise Manager takes 30-60min.
I used to be able to insert new columns above other ones in the creation interface. Now, through SQL, I am only able to tack columns onto the end of the list instead of the middle. How would this usually be done? My first guess is that it made a temporary table with the following columns and dropped the columns being shifted then recreated the table and inserted the data back in. If there's a simpler method I would love to know. Thanks for your time and help! |
||||||||||||
|
|
|||||||||||||
|
cbsinet.com
|
I'm really interested in knowing this so if anyone has information regarding this post I'd appreciate it.
|
||||||||||||
|
|
|||||||||||||
|
bobclingan
Forum Regular
|
I'm pretty sure Enterprise Manager uses some internal stored procedures to work its magic, I've read that somewhere but can't recall where. You might be able to trace it by running Profiler while altering a table in Enterprise manager on a local box, I don't feel like running downstairs to try out my theory
As far as connecting quickly... try Aqua Data Studio- its way faster than Enterprise Manager and has Query Analyzer built in with some additional handy features. http://www.aquafold.com |
||||||||||||
|
|
|||||||||||||
|
cbsinet.com
|
Those are some excellent ideas. I've heard of Aqua Data Studio before at a friend's house but I forgot about it somewhere along the line. At one point I got fed up and tried making my own enterprise manager. It was a good learning experience but I ran out of time and went back to other projects.
|
||||||||||||
|
|
|||||||||||||
|
cbsinet.com
|
I've been using Aqua Data Studio now for a couple days and it's working out great but it does not let me alter tables visually still but I've learned my way around it for now.
|
||||||||||||
|
|
|||||||||||||
|
bobum
Elvis Fanatic
![]()
|
Anyone tried this
ASP Enterprise Manager it's supposed to be like PHPMyAdmin but for SQLServer...I loved PHPMyAdmin when I was a PHP developer |
||||||||||||
|
|
|||||||||||||
|
Josh
Forum Regular
|
YES
I use it ALLLLL the time... Love it!!! |
||||||||||||
|
|
|||||||||||||
|
byron
Forum Admin
|
There is a "colorder" column in the syscolumns table, which tracks this.
You can get the id of your table in the sysobjects table declare @id int select @id = id from sysobjects where name = 'mytable' select * from syscolumns where id = @id You can modify the colorder values to get what you want. |
||||||||||||
|
|
|||||||||||||
|
NickJushchyshyn
|
My first guess is that it made a temporary table with the following columns and dropped the columns being shifted then recreated the table and inserted the data back in.
This is basically it, really. In fact, I'm pretty sure this is exactly what Enterprise Manager does. (Table objects end up with new object IDs after being "altered" in EM's design window.) This is no biggie for small tables, but if you've got something with hundreds or thousands of megs of data in it, you should consider simply using the ALTER TABLE command. This is much faster than the temp table solution and EM (whatever process it uses.) |
||||||||||||
|
|
|||||||||||||
| Table Aesthetics / Column Sort Order |
|
||
|



