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 do you mean by an execution plan? How would you view it?
Can you tell me about the concept of ER diagrams?
Do you know data definition language, data control language and data manipulation language?
What is partition index in sql server?
What is the server name in sql server?
What are different types of collation sensitivity?
What stored by the model? : sql server database administration
What will happen if a column containing char type data is changed to the nchar data type?
What is the difference between the 2 operating modes of database mirroring?
Explain the phases a transaction has to undergo?
What are the character string functions supported by sql server 2005?
How do I find information about the install locations for the various instances running on a computer?
Can we run Reporting Services with SQL Server express edition, which is a free version of SQL Server?
What is difference between line feed ( ) and carriage return ( )?
Why do we use trigger?