is there more the two primary key in a single table?
Answers were Sorted based on User's Feedback
Answer / sathishrpillai
no, but there can be any number of forgein keys in a single
A primary key of one table is the forgein key for other
|Is This Answer Correct ?||4 Yes||2 No|
Answer / navaneethakrishnan
no we cannot,
but we can do composite key in sql2005,
go in enterprise manager...
in the design view first set the primary key to one field
and then press ctrl key and set primary key to another field..
|Is This Answer Correct ?||3 Yes||1 No|
Answer / sudheer gowlikar
we cannot have more than one primary key on a table since
primary will create a clustered index and we can have only
1 clustered index on a table since clustered index will
sort data in data pages and the data sorted in one way
rather sorting number of ways.
|Is This Answer Correct ?||2 Yes||0 No|
Answer / ramesh.p
No, One table can have one primary key
|Is This Answer Correct ?||2 Yes||1 No|
Answer / boominathan
|Is This Answer Correct ?||12 Yes||12 No|
Answer / vincent
create table StudMaster(studid int not null,studname varchar
(20) not null,constraint Studmaster primary key clustered
|Is This Answer Correct ?||0 Yes||0 No|
What are the different types of stored procedures?
What is index in an assignment?
what are database files and filegroups? : Sql server database administration
How to copy the tables, schema and views from one sql server to another?
How to Run a Query on a Remote SQL Server?
How do I find the query plan in sql server?
what are defaults? Is there a column to which a default can't be bound? : Sql server database administration
What is attribute hierarchy? : sql server analysis services, ssas
Do you know what are the ways available in sql server to execute sql statements?
How do I find the sql server database version?
I have a website that allows customers to browse and place orders for certain products. I have 2 tables; Customers and Orders. The Customers table holds the customer records and the Orders table holds the orders placed by the customer. Both tables are tied based on the field Cust_ID. Example of the data is shown below: Cust_ID Cust_Name Cust_ID Product Amount Order_Date 1001 John Tan 1001 P-5211 $120.00 2/13/2006 1002 Michael Wong 1001 K-1428 $88.90 1/11/2006 1003 Mary Cheong 1003 C-0923 $82.50 1/27/2006 1004 Ahmad Suffian 1003 K-1428 $88.90 2/2/2006 Write a single SQL statement that extracts all purchase records with the following criteria: 1. Customer names starting with “M” only. 2. Orders placed within the current month only. 3. Amount does not exceed $100.00 The list must be sorted by order date with the latest order showing on top.
How to update values in a table with update statements in ms sql server?