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
Why we use the openxml clause?
Define normalisation?
What is the contrast amongst drop and truncate?
How to create a ddl trigger using "create trigger" statements?
What is a fill factor?
How to send a ssrs report from ssis?
Every night you run a full backup after every 3 three hours you make a differential backup every hour you make an incremental backup in a worst-case scenario, how much work you can lose?
How many types of local tables are there in sql server?
What types of replication are supported in sql server?
What is sql server english query?
What do you mean by acid?
What is 'Join' and explain its various types.
How to convert numeric expression data types by assignment operations?
Where are sql server usernames and passwords stored in the sql server?
How to get the definition of a user defined function back?