What is the difference between UNIQUE and DISTINCT keywords in DBMS?
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 |
What are “phantom rows”?
Can you change the data type of a column in a table after the table has been created? If so, which command would you use?
How To Make password Protected SQL Server 2005 Database i.e when i open SQL Server database then ask for password.
How do use Having,Group by,Group function in SQL?
What area unit the various kinds of info compression introduced in sql server 2008?
Which sql server table is used to hold the stored procedure script?
List out the different types of locks available in sql server?
How do I create an extended event in sql server?
What is the stuff and how does it differ from the replace function?
How to declare and use cursor variables?
Anyone please explain me the concept of Serialization?
What is named query? : sql server analysis services, ssas