Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the difference between UNIQUE and DISTINCT keywords in DBMS?



What is the difference between UNIQUE and DISTINCT keywords in DBMS?..

Answer / anjaligarg

First we declare is as primary key and after group by we can get uniqu values.

CREATE TABLE Persons (
ID int NOT NULL,
LastName varchar(255) NOT NULL,
FirstName varchar(255),
Age int,
PRIMARY KEY (ID)
);

SELECT ID, LastName,FirstName
FROM Persons
GROUP BY ID, LastName,FirstName;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

Explain the difference between primary keys and foreign keys?

0 Answers  


Different Types of Functions ?

2 Answers   Satyam,


What is DAC? what is the use of it?

1 Answers   Wipro,


What authentication modes does sql server support?

0 Answers  


When do you use SQL Profiler?

3 Answers   Wipro,


Explain stored procedure?

0 Answers  


what is the sql equivaent of the dataset relation object ?

0 Answers  


Can we add a cpu to sql server?

0 Answers  


explain declarative management framework (dmf) in sql server 2008?

0 Answers  


How do I list the available tables in a database I'm querying?

4 Answers  


How do you open a cluster administrator?

0 Answers  


Difference between report and query parameter. Why do we need different type of parameter?

0 Answers  


Categories