Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Alter Table column set position

Author  Topic 

vijaynetpart
Starting Member

18 Posts

Posted - 2009-09-30 : 09:08:38
I have a below table structure

Id LastName
1 Kumar
I like to set the New Column (FirstName) in Second Position..

Id FirstName LastName -->(Using Alter Table)

vijayisonly
Master Smack Fu Yak Hacker

1836 Posts

Posted - 2009-09-30 : 09:14:37
How does it matter where the column is?
Go to Top of Page

vijaynetpart
Starting Member

18 Posts

Posted - 2009-09-30 : 09:21:39
ya..must to create a columns in proper order.

Easily we have checking the records manually,
if we creating a columns in a propery way

Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-09-30 : 09:46:23
quote:
Originally posted by vijaynetpart

ya..must to create a columns in proper order.

Easily we have checking the records manually,
if we creating a columns in a propery way




It doesnt matter what the position of the column is
Use them in proper order when using a SELECT statement

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

vijaynetpart
Starting Member

18 Posts

Posted - 2009-10-01 : 00:12:06
Is this possible r not?....That's my question
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-10-01 : 01:35:26
quote:
Originally posted by vijaynetpart

Is this possible r not?....That's my question


its not possible unless you create a copy of table with columns in correct position and copy data to it. can i ask the need for such a requirement?
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-10-01 : 01:50:26
quote:
Originally posted by vijaynetpart

ya..must to create a columns in proper order.

Easily we have checking the records manually,
if we creating a columns in a propery way




Why are you manually checking the records?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

vijaynetpart
Starting Member

18 Posts

Posted - 2009-10-03 : 08:44:25
this is my interview question in wipro
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-10-03 : 09:00:20
quote:
Originally posted by vijaynetpart

this is my interview question in wipro


Then my first reply of this thread is still valid answer

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-10-03 : 09:01:01
quote:
Originally posted by vijaynetpart

this is my interview question in wipro


Did you get selected?

Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -