Ask Paula!

...bringing you notes from the field...
posts - 117 , comments - 87 , trackbacks - 0

My Links

News

Copyright © 2008-2014 Paula DiTallo

Tag Cloud

Article Categories

Archives

Post Categories

Image Galleries

.NET Development

Enterprise Integration

Entertainment - Games

Java Development

Mobile/PDA Development

Professional Affiliations

November 2009 Entries

How do I move a table from one schema to another in SQL Server?
This should work for SQL Server 2005/2008-- ALTER SCHEMA SchemaNameForTarget TRANSFER SchemaNameOfSource.MyTableName example: ALTER SCHEMA RiskEvaluation TRANSFER dbo.ConvertibleDebenture ......

Posted On Monday, November 23, 2009 6:04 AM | Comments (1) |

How do I create an Index that is NOT the primary on my tables?

To create a index on a single column, do this:

CREATE INDEX  IDX_FERC ON FERC(FercName)

In some cases, you may have a need to combine columns to hasten known unique combinations. This is knonw as a composite key. An example:

CREATE INDEX IDX_OperatingCompanyFERC ON FERC(OpCompanyID,FercName)


Posted On Monday, November 2, 2009 8:07 AM | Comments (0) |

Powered by: