473,461 Members | 1,681 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to insert a new column between 2 column in a Table in MSSQL 2008?

147 100+
hi,

i have the following columns :

empno empname designation


In between empname and designation, i want to add new column location.

empno empname location designation.

Thanks in advance
Oct 27 '10 #1
3 2464
gpl
152 100+
use alter table / add column

The order of columns really shouldnt matter as you can place them in any order in your select query
Oct 27 '10 #2
santhanalakshmi
147 100+
Its k, fine. What do you told ? I want to know, whether its it possible to add like this or not in MS SQL 2008.

Possible to add columns in between the columns ?
Oct 27 '10 #3
ck9663
2,878 Expert 2GB
You can add a column, but not insert. In theory, relational databases does not care about the sequence of the column nor rows. At least in theory. This because you can specify the sequence of these columns, anyway....

If you really need to, create a table with that new column inserted, then populate it with your data coming from the original table.

Good Luck!!!

~~ CK
Oct 27 '10 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: Don Grover | last post by:
I have a HTML table created using ASP as a web page. ie. HEADING1 HEADING2 HEADING3 etc... data 1 data2 data3 etc and so on How can I toggle hide /...
0
by: crypto_solid via AccessMonster.com | last post by:
I have been using a SQL database with a VB5 frontend for about 5 years. Works well. Unfortunately I don't have access to the source code. I was tasked with implementing a "job entry" application...
1
by: johnb41 | last post by:
You can ADD a column to a datatable easily: datatable.Columns.Add() I would like to INSERT a column instead of adding it to the end. Is this possible? Thanks! John
0
by: Toni Pohl | last post by:
Hi all, I use the calendar control of asp.net 1.1. I want to insert an extra column for the calendar week. Is there a (simple) way to insert a column? I didn´t find a method, not even in the...
6
by: Christopher Lusardi | last post by:
How can I fix this? When I do the below I get the error message: "Cannot insert explict value for identity column in table 'Employees' when IDENTITY_INSERT is set to OFF." To get this message,...
2
by: fatjoez | last post by:
Hi there. I'm trying to create a Trigger for on insert, which will be triggered upon any attempted insert into a database table item. Basically want it to say, if the attempted insert value for...
1
by: technocraze | last post by:
Hi guys, I am having trouble resolving this error. Below mentioned is my code and implmentation. MS Acess is my front end and sql server is my backend. What i want to achieve is to be...
3
by: madhavi123 | last post by:
Hi All, I have a to insert a set of rows into a table which is on some other server, and that table has an identity column which is also a primary key of that column. I am getting the error...
0
by: Joe Yu | last post by:
I recently read Scott Mitchell's article series "Examining ASP.NET's Membership, Roles, and Profile". In Part 6http://www.4guysfromrolla.com/articles/101106-1.aspx, It says "to store additional,...
1
by: santhanalakshmi | last post by:
Hi, Any one let me know, where will store all the users password plus the root password(sa) in MSSQL server 2008? In which tables we will find all the passwords ? I...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.