Showing posts with label table1. Show all posts
Showing posts with label table1. Show all posts

Tuesday, March 6, 2012

Adding new content to a table by refering other tables using SQL

I keep product name, id in Table1.

I keep Category name, id in Table2.

I keep relation between product and category (product_id, category_id) in Table3.

I have added some products to the table with proper category.

Work fine

But for some products I did not specified any category

(ie their id is not present in Table3)

But now I want all such products

(ie all products whose category is nothing)

To be associated with category_id 10

Can I do this simply with SQL queries?

Hope u can help me

sujith

Hellosujith!

UPDATE [TableName] -- in your case it will be TABLE3

SET [FieldName] = 10 -- in your case it will be CATEGORY_ID

WHERE [FieldName] IS NULL -- in your case i dont know if it is NULL or ''

http://www.w3schools.com take a look at this site to learn more about SQL STATEMENT

HAVE NICE QUERY'S

|||

But I don't have any entry in table 3 if the category of a product is nothing.

I insert data into table 3 if and only if a product , belonged to acategory(this is how I save space)

|||

ohhhh...

You want to see all products that doesn't has category_Id and isnert into table 3 with category_Id = 10!

Is this that you want?

Sorry if i am not understanding your question!!

|||

sujithukvl@.gmail.com:

I keep product name, id in Table1.

I keep Category name, id in Table2.

I keep relation between product and category (product_id, category_id) in Table3.

I have added some products to the table with proper category.

Work fine

But for some products I did not specified any category

(ie their id is not present in Table3)

But now I want all such products

(ie all products whose category is nothing)

To be associated with category_id 10

Can I do this simply with SQL queries?

Hope u can help me

sujith

Following Sql statement might suite your need:

insert into product_categoryselect id ,'10'fromproductwherenot exists (select *from product_categorywhere product_category.pro_id = product.id)

Saturday, February 25, 2012

Adding INDEX causes DEADLOCKS?

I have a very small table (50 rows, 50 columns).
I have 4 servers using the table:
1 server updates the table ("UPDATE table SET col1='', col2='',
LastUpdate=GetDate()").. about 20 rows updated a second.
3 servers pull data ("SELECT * FROM table Where
LastUpdate>(lastrequest) and COL3>0") the 3 servers pull data about 6
times a second each.
Prior to last week, i did not have the lastupdate column. but it
obviously made sense to me to add it (why pull everything every 100ms
when you can only pull what you need via the LastUpdate, maybe 3-4
rows at a time). so i add the lastupdate column and make an index on
it.
now as soon as i run it, every 2-4 minutes i get a deadlock (!).
execution path is showing a bookmark lookup with index seek because i
have two conditions in the where clause: "lastupdate>(time
oflastrequest) and COL3>0". i have tried making an index based upon
both lastUpdate,Col3 but the results are the same (lots of deadlocks)
I have removed the index, kept the lastupdate column, same queries,
and everything works fine -- except, of course, that it is doing a
table scan for every lookup. the table will be growing soon and i
will be in trouble. so i need some help here, any ideas?
> 1 server updates the table ("UPDATE table SET col1='', col2='',
> LastUpdate=GetDate()").. about 20 rows updated a second.
You update the whole table every time? Why?
|||"steve cabello" <basistrdr@.hotmail.com> wrote in message
news:4d625a1.0405240841.4c3a0ba9@.posting.google.co m...
> I have a very small table (50 rows, 50 columns).
> I have 4 servers using the table:
> 1 server updates the table ("UPDATE table SET col1='', col2='',
> LastUpdate=GetDate()").. about 20 rows updated a second.
> 3 servers pull data ("SELECT * FROM table Where
> LastUpdate>(lastrequest) and COL3>0") the 3 servers pull data about 6
> times a second each.
> Prior to last week, i did not have the lastupdate column. but it
> obviously made sense to me to add it (why pull everything every 100ms
> when you can only pull what you need via the LastUpdate, maybe 3-4
> rows at a time). so i add the lastupdate column and make an index on
> it.
> now as soon as i run it, every 2-4 minutes i get a deadlock (!).
> execution path is showing a bookmark lookup with index seek because i
> have two conditions in the where clause: "lastupdate>(time
> oflastrequest) and COL3>0". i have tried making an index based upon
> both lastUpdate,Col3 but the results are the same (lots of deadlocks)
> I have removed the index, kept the lastupdate column, same queries,
> and everything works fine -- except, of course, that it is doing a
> table scan for every lookup. the table will be growing soon and i
> will be in trouble. so i need some help here, any ideas?
Easiest way to solve these problems is with more locking. I know, it sounds
weird, but more locking will separate the deadlocking processes and properly
serialize them. I suggest in your Update statement add a TABLOCKX hint.
That will exclusively lock the entire table for the duration of the update.
This will also give you more predictable results as the table will only be
read when it is in a completely consistent state between updates.
David
|||The deadlock is due to that for the 3 server pulling data, it needs to get
page/row lock on the non-clustered index first, then get page/row lock on
the base table(while holding the lock on the non-clustered index), while the
update gets lock on base table first, then the lock on page/row in the
non-clustered index. To break the circle, you can either create a clustered
index on the LastUpdate field instead of a non-clustered index, or either
specify TABLOCKX hint for the update or specify readpast lock hint for the
reader.
Gang He
SQL Server Storage Engine Development
This posting is provided "AS IS" with no warranties, and confers no rights.
"steve cabello" <basistrdr@.hotmail.com> wrote in message
news:4d625a1.0405240841.4c3a0ba9@.posting.google.co m...
> I have a very small table (50 rows, 50 columns).
> I have 4 servers using the table:
> 1 server updates the table ("UPDATE table SET col1='', col2='',
> LastUpdate=GetDate()").. about 20 rows updated a second.
> 3 servers pull data ("SELECT * FROM table Where
> LastUpdate>(lastrequest) and COL3>0") the 3 servers pull data about 6
> times a second each.
> Prior to last week, i did not have the lastupdate column. but it
> obviously made sense to me to add it (why pull everything every 100ms
> when you can only pull what you need via the LastUpdate, maybe 3-4
> rows at a time). so i add the lastupdate column and make an index on
> it.
> now as soon as i run it, every 2-4 minutes i get a deadlock (!).
> execution path is showing a bookmark lookup with index seek because i
> have two conditions in the where clause: "lastupdate>(time
> oflastrequest) and COL3>0". i have tried making an index based upon
> both lastUpdate,Col3 but the results are the same (lots of deadlocks)
> I have removed the index, kept the lastupdate column, same queries,
> and everything works fine -- except, of course, that it is doing a
> table scan for every lookup. the table will be growing soon and i
> will be in trouble. so i need some help here, any ideas?
|||"Gang He [MSFT]" <ganghe@.online.microsoft.com> wrote in message
news:u4Gn6SuQEHA.2408@.tk2msftngp13.phx.gbl...
> The deadlock is due to that for the 3 server pulling data, it needs to get
> page/row lock on the non-clustered index first, then get page/row lock on
> the base table(while holding the lock on the non-clustered index), while
the
> update gets lock on base table first, then the lock on page/row in the
> non-clustered index. To break the circle, you can either create a
clustered
> index on the LastUpdate field instead of a non-clustered index, or either
> specify TABLOCKX hint for the update or specify readpast lock hint for the
> reader.
> --
> Gang He
> SQL Server Storage Engine Development
Good info. Thanks for the post Gang.
David

Adding INDEX causes DEADLOCKS?

I have a very small table (50 rows, 50 columns).
I have 4 servers using the table:
1 server updates the table ("UPDATE table SET col1='', col2='',
LastUpdate=GetDate()").. about 20 rows updated a second.
3 servers pull data ("SELECT * FROM table Where
LastUpdate>(lastrequest) and COL3>0") the 3 servers pull data about 6
times a second each.
Prior to last week, i did not have the lastupdate column. but it
obviously made sense to me to add it (why pull everything every 100ms
when you can only pull what you need via the LastUpdate, maybe 3-4
rows at a time). so i add the lastupdate column and make an index on
it.
now as soon as i run it, every 2-4 minutes i get a deadlock (!).
execution path is showing a bookmark lookup with index seek because i
have two conditions in the where clause: "lastupdate>(time
oflastrequest) and COL3>0". i have tried making an index based upon
both lastUpdate,Col3 but the results are the same (lots of deadlocks)
I have removed the index, kept the lastupdate column, same queries,
and everything works fine -- except, of course, that it is doing a
table scan for every lookup. the table will be growing soon and i
will be in trouble. so i need some help here, any ideas?> 1 server updates the table ("UPDATE table SET col1='', col2='',
> LastUpdate=GetDate()").. about 20 rows updated a second.
You update the whole table every time? Why?|||"steve cabello" <basistrdr@.hotmail.com> wrote in message
news:4d625a1.0405240841.4c3a0ba9@.posting.google.com...
> I have a very small table (50 rows, 50 columns).
> I have 4 servers using the table:
> 1 server updates the table ("UPDATE table SET col1='', col2='',
> LastUpdate=GetDate()").. about 20 rows updated a second.
> 3 servers pull data ("SELECT * FROM table Where
> LastUpdate>(lastrequest) and COL3>0") the 3 servers pull data about 6
> times a second each.
> Prior to last week, i did not have the lastupdate column. but it
> obviously made sense to me to add it (why pull everything every 100ms
> when you can only pull what you need via the LastUpdate, maybe 3-4
> rows at a time). so i add the lastupdate column and make an index on
> it.
> now as soon as i run it, every 2-4 minutes i get a deadlock (!).
> execution path is showing a bookmark lookup with index seek because i
> have two conditions in the where clause: "lastupdate>(time
> oflastrequest) and COL3>0". i have tried making an index based upon
> both lastUpdate,Col3 but the results are the same (lots of deadlocks)
> I have removed the index, kept the lastupdate column, same queries,
> and everything works fine -- except, of course, that it is doing a
> table scan for every lookup. the table will be growing soon and i
> will be in trouble. so i need some help here, any ideas?
Easiest way to solve these problems is with more locking. I know, it sounds
weird, but more locking will separate the deadlocking processes and properly
serialize them. I suggest in your Update statement add a TABLOCKX hint.
That will exclusively lock the entire table for the duration of the update.
This will also give you more predictable results as the table will only be
read when it is in a completely consistent state between updates.
David|||The deadlock is due to that for the 3 server pulling data, it needs to get
page/row lock on the non-clustered index first, then get page/row lock on
the base table(while holding the lock on the non-clustered index), while the
update gets lock on base table first, then the lock on page/row in the
non-clustered index. To break the circle, you can either create a clustered
index on the LastUpdate field instead of a non-clustered index, or either
specify TABLOCKX hint for the update or specify readpast lock hint for the
reader.
Gang He
SQL Server Storage Engine Development
This posting is provided "AS IS" with no warranties, and confers no rights.
"steve cabello" <basistrdr@.hotmail.com> wrote in message
news:4d625a1.0405240841.4c3a0ba9@.posting.google.com...
> I have a very small table (50 rows, 50 columns).
> I have 4 servers using the table:
> 1 server updates the table ("UPDATE table SET col1='', col2='',
> LastUpdate=GetDate()").. about 20 rows updated a second.
> 3 servers pull data ("SELECT * FROM table Where
> LastUpdate>(lastrequest) and COL3>0") the 3 servers pull data about 6
> times a second each.
> Prior to last week, i did not have the lastupdate column. but it
> obviously made sense to me to add it (why pull everything every 100ms
> when you can only pull what you need via the LastUpdate, maybe 3-4
> rows at a time). so i add the lastupdate column and make an index on
> it.
> now as soon as i run it, every 2-4 minutes i get a deadlock (!).
> execution path is showing a bookmark lookup with index seek because i
> have two conditions in the where clause: "lastupdate>(time
> oflastrequest) and COL3>0". i have tried making an index based upon
> both lastUpdate,Col3 but the results are the same (lots of deadlocks)
> I have removed the index, kept the lastupdate column, same queries,
> and everything works fine -- except, of course, that it is doing a
> table scan for every lookup. the table will be growing soon and i
> will be in trouble. so i need some help here, any ideas?|||"Gang He [MSFT]" <ganghe@.online.microsoft.com> wrote in message
news:u4Gn6SuQEHA.2408@.tk2msftngp13.phx.gbl...
> The deadlock is due to that for the 3 server pulling data, it needs to get
> page/row lock on the non-clustered index first, then get page/row lock on
> the base table(while holding the lock on the non-clustered index), while
the
> update gets lock on base table first, then the lock on page/row in the
> non-clustered index. To break the circle, you can either create a
clustered
> index on the LastUpdate field instead of a non-clustered index, or either
> specify TABLOCKX hint for the update or specify readpast lock hint for the
> reader.
> --
> Gang He
> SQL Server Storage Engine Development
Good info. Thanks for the post Gang.
David

Sunday, February 19, 2012

adding dbo before tablename

Hi all
What is the impact of adding dbo with tablename
for example
select * from dbo. table1
instead of
select * from table1
does adding dbo before table1 makes any benefit?
ThanksHi
"Worst Practice - Not Qualifying Objects With The Owner"
http://www.sqlservercentral.com/col...iththeowner.asp
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"AM" <anonymous@.examnotes.net> wrote in message
news:O5mRGu4SFHA.3176@.TK2MSFTNGP09.phx.gbl...
> Hi all
> What is the impact of adding dbo with tablename
> for example
> select * from dbo. table1
> instead of
> select * from table1
> does adding dbo before table1 makes any benefit?
> Thanks
>
>
>
>|||If I'm not mistaken, there is a slight performance improvement by designatin
g
the owner name in that the system does not have to guess. The system will fi
rst
try: username.Table1 and if that doesn't work it will try dbo.Table1.
Thomas
"AM" <anonymous@.examnotes.net> wrote in message
news:O5mRGu4SFHA.3176@.TK2MSFTNGP09.phx.gbl...
> Hi all
> What is the impact of adding dbo with tablename
> for example
> select * from dbo. table1
> instead of
> select * from table1
> does adding dbo before table1 makes any benefit?
> Thanks
>
>
>
>|||It improves performance, and for some database objects it is a requirement
(i.e., user-defined functions). It's good to get in the habit of always
qualifying your tables, SP's and UDF's with the owner's name.
"AM" <anonymous@.examnotes.net> wrote in message
news:O5mRGu4SFHA.3176@.TK2MSFTNGP09.phx.gbl...
> Hi all
> What is the impact of adding dbo with tablename
> for example
> select * from dbo. table1
> instead of
> select * from table1
> does adding dbo before table1 makes any benefit?
> Thanks
>
>
>
>|||There is a BIG impact if dbo is not the owner of the table, in which case
SQL Server will not be able to find the table. As others have said, it is
best practices to always qualify an object with the name of its owner. DBO
is a user name in every database, and a frequent owner of objects. But it
is not the only owner of objects.
You can have multiple tables with the same name, so if you say select * from
table1, SQL Server has to figure out WHICH table1 you're referring to. The
default is first to check to see if the current user owns an object table,
and then to check if the user dbo owns a table1.
Please read about users and objects owners in the Books Online.
HTH
--
Kalen Delaney
SQL Server MVP
www.SolidQualityLearning.com
"AM" <anonymous@.examnotes.net> wrote in message
news:O5mRGu4SFHA.3176@.TK2MSFTNGP09.phx.gbl...
> Hi all
> What is the impact of adding dbo with tablename
> for example
> select * from dbo. table1
> instead of
> select * from table1
> does adding dbo before table1 makes any benefit?
> Thanks
>
>
>
>

Monday, February 13, 2012

Adding Column Using TSQL With Sequence Specified

I am looking for ways to add new column to a table with records inside. If I add the column using this statement:
ALTER TABLE Table1 ADD NewColumn1 decimal(18, 2) NULL
The column would appear at the end.

Is there a way to set where the column should be placed? (Excluding dropping all columns and add the columns in sequence again). I know this might not be very important, I am interested in knowing how Enterprise Manager done this, since you can move a column up and down to change their sequence eventhough there're records inside.EM creates a temp table, then reorganizes the columns in the base table, then inserts the records into the newly structured table.

Adding Column To A Table At a Specific Position

Dear All
Is there a way in T-Sql where I can add a column in a specific order to an
existing table. For instance, if I have the following table
1. EmpID
2.Fname
3. Mname
4. Lname
5. Add1
6.Add2
I want to insert a Column PHNo before column 5. Is there a possibility in
T-SQL for this.
Hope to hear from you soon.
TIA.
Saleem
Muhammad Saleem Usmani
9-Sassi Town House
Abdullah Haroon Road
Karachi
PH: 92-21-521-2042-3
FAX: 92-21-521-2046
CELL: 0300-822-0105
support-karachi@.autosoftdynamics.com
usmani@.autosoftdynamics.com
I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.htmlOn Thu, 4 Nov 2004 15:25:12 +0500, Muhammad Saleem Usmani wrote:

>I want to insert a Column PHNo before column 5. Is there a possibility in
>T-SQL for this.
Hi Muhammad,
No, the only way you can achieve this is by dropping and recreating the
table.
Why would you want this? A table in a relational database is UNordered by
definition; you should assign no meaning to the cardinal positions of
columns, nor should you use code that relies on column order.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Hi
No. The only way would be to re-create the table with the new structure and
copy the data over.
If you need to have a specific order for a select, you should specifcy the
columns in the select statement.
Regards
Mike
"Muhammad Saleem Usmani" wrote:

> Dear All
> Is there a way in T-Sql where I can add a column in a specific order to an
> existing table. For instance, if I have the following table
> 1. EmpID
> 2.Fname
> 3. Mname
> 4. Lname
> 5. Add1
> 6.Add2
> I want to insert a Column PHNo before column 5. Is there a possibility in
> T-SQL for this.
> Hope to hear from you soon.
> TIA.
> Saleem
>
> --
> Muhammad Saleem Usmani
> 9-Sassi Town House
> Abdullah Haroon Road
> Karachi
> PH: 92-21-521-2042-3
> FAX: 92-21-521-2046
> CELL: 0300-822-0105
> support-karachi@.autosoftdynamics.com
> usmani@.autosoftdynamics.com
>
> I choose Polesoft Lockspam to fight spam, and you?
> http://www.polesoft.com/refer.html
>
>|||I agree with the others... When I first started doing SQL I was all into the
physical ordering of the columns, because my background was COBOL, and it
was important there...But trying to keep up with this will be a nightmare...
It would be better to begin to enforce with the programmers, never to select
* , always use column names. Always use the column list in an insert
statement ie
insert into mytab ( col1, colu2) values ( 1,2)
this frees you up from the logical ordering of columns...
Good luck to you!
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Muhammad Saleem Usmani" <support-karachi@.autosoftdynamics.com> wrote in
message news:%23VUd$glwEHA.3908@.TK2MSFTNGP12.phx.gbl...
> Dear All
> Is there a way in T-Sql where I can add a column in a specific order to an
> existing table. For instance, if I have the following table
> 1. EmpID
> 2.Fname
> 3. Mname
> 4. Lname
> 5. Add1
> 6.Add2
> I want to insert a Column PHNo before column 5. Is there a possibility in
> T-SQL for this.
> Hope to hear from you soon.
> TIA.
> Saleem
>
> --
> Muhammad Saleem Usmani
> 9-Sassi Town House
> Abdullah Haroon Road
> Karachi
> PH: 92-21-521-2042-3
> FAX: 92-21-521-2046
> CELL: 0300-822-0105
> support-karachi@.autosoftdynamics.com
> usmani@.autosoftdynamics.com
>
> I choose Polesoft Lockspam to fight spam, and you?
> http://www.polesoft.com/refer.html
>|||No. Just in EM.
"Muhammad Saleem Usmani" wrote:

> Dear All
> Is there a way in T-Sql where I can add a column in a specific order to an
> existing table. For instance, if I have the following table
> 1. EmpID
> 2.Fname
> 3. Mname
> 4. Lname
> 5. Add1
> 6.Add2
> I want to insert a Column PHNo before column 5. Is there a possibility in
> T-SQL for this.
> Hope to hear from you soon.
> TIA.
> Saleem
>
> --
> Muhammad Saleem Usmani
> 9-Sassi Town House
> Abdullah Haroon Road
> Karachi
> PH: 92-21-521-2042-3
> FAX: 92-21-521-2046
> CELL: 0300-822-0105
> support-karachi@.autosoftdynamics.com
> usmani@.autosoftdynamics.com
>
> I choose Polesoft Lockspam to fight spam, and you?
> http://www.polesoft.com/refer.html
>
>

Adding Column To A Table At a Specific Position

Dear All
Is there a way in T-Sql where I can add a column in a specific order to an
existing table. For instance, if I have the following table
1. EmpID
2.Fname
3. Mname
4. Lname
5. Add1
6.Add2
I want to insert a Column PHNo before column 5. Is there a possibility in
T-SQL for this.
Hope to hear from you soon.
TIA.
Saleem
Muhammad Saleem Usmani
9-Sassi Town House
Abdullah Haroon Road
Karachi
PH: 92-21-521-2042-3
FAX: 92-21-521-2046
CELL: 0300-822-0105
support-karachi@.autosoftdynamics.com
usmani@.autosoftdynamics.com
I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
On Thu, 4 Nov 2004 15:25:12 +0500, Muhammad Saleem Usmani wrote:

>I want to insert a Column PHNo before column 5. Is there a possibility in
>T-SQL for this.
Hi Muhammad,
No, the only way you can achieve this is by dropping and recreating the
table.
Why would you want this? A table in a relational database is UNordered by
definition; you should assign no meaning to the cardinal positions of
columns, nor should you use code that relies on column order.
Best, Hugo
(Remove _NO_ and _SPAM_ to get my e-mail address)
|||Hi
No. The only way would be to re-create the table with the new structure and
copy the data over.
If you need to have a specific order for a select, you should specifcy the
columns in the select statement.
Regards
Mike
"Muhammad Saleem Usmani" wrote:

> Dear All
> Is there a way in T-Sql where I can add a column in a specific order to an
> existing table. For instance, if I have the following table
> 1. EmpID
> 2.Fname
> 3. Mname
> 4. Lname
> 5. Add1
> 6.Add2
> I want to insert a Column PHNo before column 5. Is there a possibility in
> T-SQL for this.
> Hope to hear from you soon.
> TIA.
> Saleem
>
> --
> Muhammad Saleem Usmani
> 9-Sassi Town House
> Abdullah Haroon Road
> Karachi
> PH: 92-21-521-2042-3
> FAX: 92-21-521-2046
> CELL: 0300-822-0105
> support-karachi@.autosoftdynamics.com
> usmani@.autosoftdynamics.com
>
> I choose Polesoft Lockspam to fight spam, and you?
> http://www.polesoft.com/refer.html
>
>
|||I agree with the others... When I first started doing SQL I was all into the
physical ordering of the columns, because my background was COBOL, and it
was important there...But trying to keep up with this will be a nightmare...
It would be better to begin to enforce with the programmers, never to select
* , always use column names. Always use the column list in an insert
statement ie
insert into mytab ( col1, colu2) values ( 1,2)
this frees you up from the logical ordering of columns...
Good luck to you!
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Muhammad Saleem Usmani" <support-karachi@.autosoftdynamics.com> wrote in
message news:%23VUd$glwEHA.3908@.TK2MSFTNGP12.phx.gbl...
> Dear All
> Is there a way in T-Sql where I can add a column in a specific order to an
> existing table. For instance, if I have the following table
> 1. EmpID
> 2.Fname
> 3. Mname
> 4. Lname
> 5. Add1
> 6.Add2
> I want to insert a Column PHNo before column 5. Is there a possibility in
> T-SQL for this.
> Hope to hear from you soon.
> TIA.
> Saleem
>
> --
> Muhammad Saleem Usmani
> 9-Sassi Town House
> Abdullah Haroon Road
> Karachi
> PH: 92-21-521-2042-3
> FAX: 92-21-521-2046
> CELL: 0300-822-0105
> support-karachi@.autosoftdynamics.com
> usmani@.autosoftdynamics.com
>
> I choose Polesoft Lockspam to fight spam, and you?
> http://www.polesoft.com/refer.html
>
|||No. Just in EM.
"Muhammad Saleem Usmani" wrote:

> Dear All
> Is there a way in T-Sql where I can add a column in a specific order to an
> existing table. For instance, if I have the following table
> 1. EmpID
> 2.Fname
> 3. Mname
> 4. Lname
> 5. Add1
> 6.Add2
> I want to insert a Column PHNo before column 5. Is there a possibility in
> T-SQL for this.
> Hope to hear from you soon.
> TIA.
> Saleem
>
> --
> Muhammad Saleem Usmani
> 9-Sassi Town House
> Abdullah Haroon Road
> Karachi
> PH: 92-21-521-2042-3
> FAX: 92-21-521-2046
> CELL: 0300-822-0105
> support-karachi@.autosoftdynamics.com
> usmani@.autosoftdynamics.com
>
> I choose Polesoft Lockspam to fight spam, and you?
> http://www.polesoft.com/refer.html
>
>