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 does the on update no action do?

979


How to locate and take substrings with charindex() and substring() functions?

963


What is etl - extraction, transformation, and loading?

871


Explain temporary table vs table variable by using cursor alternative?

954


How to receive returning result from a query?

1065


What are the disadvantages of merge replication?

1334


What is optimization and its types?

931


Explain table valued parameters in sql server? Why tvp used?

979


What are different types of statements that are supported by sql?

993


What can be used instead of trigger?

1113


Write a query for primary key constraint with identity key word?

990


Explain the xml support sql server extends?

1002


What is sleeping status in sql server?

996


role of sql sever 2005 in database rather than any other database

1902


List the different index configurations possible for a table?

897