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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between dbcc indexdefrag and dbcc reindex?

987


What does COMMIT command do?

1067


What are the advantages of paper records?

969


What is a benefit of using an after insert trigger over using a before insert trigger?

985


Do comments need to go in a special place in sql server 2005?

859


How to display a past time in days, hours and minutes?

1016


What program is used to store the data source file?

961


What is failover clustering overview?

1090


How many cores do I need for sql server 2016?

899


Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?

952


What are the grouping functions?

934


What do you understand by the data quality services in sql server?

948


what are different types of raid configurations? : Sql server database administration

1059


Differentiate sql server reporting services vs. Crystal reports?

200


Explain sql server service broker?

978