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 some stored procedure creating best practices or guidelines?

0 Answers  


Name 3 of the features that the sql server built-in function loginproperty performs on standard logins? : sql server security

0 Answers  


How to execute multiple stored procedures at one time in sql server?

0 Answers  


How do I partition a table in sql server?

0 Answers  


What is the difference between a Application Server and a Database

3 Answers   Oracle,


Can I run multiple instances of sql server 2000 at the same time on one computer?

0 Answers  


How to connect ms access to sql servers through odbc?

0 Answers  


What are Row versions of DataRow?

0 Answers  


Why do we need different type of parameter?

0 Answers  


Explain difference between control flow and data flow?

0 Answers  


What are the difference between primary keys and foreign keys?

0 Answers  


What you can do to delete a table without the delete trigger firing?

0 Answers  


Categories