Friday, June 1, 2007

About SQL server DB

NVARCHAR versus VARCHAR


SQL Server provides both datatypes to store character information. For the most part the two datatypes are identical in how you would work with them within SQL Server or from an application. The difference is that nvarchar is used to store unicode data, which is used to store multilingual data in your database tables. Other languages have an extended set of character codes that need to be saved and this datatype allows for this extension. If your database will not be storing multilingual data you should use the varchar datatype instead. The reason for this is that nvarchar takes twice as much space as varchar, this is because of the need to store the extended character codes for other languages from Ask The Database Expert: Questions & Answers


What are Candidate, alternate and composite keys?


A candidate key is one that can identify each row of a table uniquely. Generally a candidate key becomes the primary key of the table. If the table has more than one candidate key, one of them will become the primary key, and the rest are called alternate keys.

A key formed by combining at least two or more columns is called composite key.

-------------------------------------------------

how to view or see our TRIGGERS in our table

It's a bit cludgy, but in Enterprise Manager, on the database you are
looking at,
Right click on a particular table and
select [generate SQL scripts].

Untick [Script All Objects]
Tick [All Tables]
Under the [Formatting Tab] untick everything.
Under the [Options] tab, tick [Script Triggers]
(.) Create one file
Then [OK]




No comments: