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
What is the difference between dbcc indexdefrag and dbcc reindex?
What does COMMIT command do?
What are the advantages of paper records?
What is a benefit of using an after insert trigger over using a before insert trigger?
Do comments need to go in a special place in sql server 2005?
How to display a past time in days, hours and minutes?
What program is used to store the data source file?
What is failover clustering overview?
How many cores do I need for sql server 2016?
Once setting replication, can you have distributor on sql server 2005, publisher of sql server 2008?
What are the grouping functions?
What do you understand by the data quality services in sql server?
what are different types of raid configurations? : Sql server database administration
Differentiate sql server reporting services vs. Crystal reports?
Explain sql server service broker?