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 do you mean by an execution plan? How would you view it?

871


Can you tell me about the concept of ER diagrams?

1018


Do you know data definition language, data control language and data manipulation language?

987


What is partition index in sql server?

1049


What is the server name in sql server?

959


What are different types of collation sensitivity?

943


What stored by the model? : sql server database administration

903


What will happen if a column containing char type data is changed to the nchar data type?

1044


What is the difference between the 2 operating modes of database mirroring?

1059


Explain the phases a transaction has to undergo?

987


What are the character string functions supported by sql server 2005?

936


How do I find information about the install locations for the various instances running on a computer?

1033


Can we run Reporting Services with SQL Server express edition, which is a free version of SQL Server?

112


What is difference between line feed ( ) and carriage return ( )?

855


Why do we use trigger?

917