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 |
Explain the difference between primary keys and foreign keys?
Different Types of Functions ?
What is DAC? what is the use of it?
What authentication modes does sql server support?
When do you use SQL Profiler?
Explain stored procedure?
what is the sql equivaent of the dataset relation object ?
Can we add a cpu to sql server?
explain declarative management framework (dmf) in sql server 2008?
How do I list the available tables in a database I'm querying?
How do you open a cluster administrator?
Difference between report and query parameter. Why do we need different type of parameter?
Oracle (3259)
SQL Server (4518)
MS Access (429)
MySQL (1402)
Postgre (483)
Sybase (267)
DB Architecture (141)
DB Administration (291)
DB Development (113)
SQL PLSQL (3330)
MongoDB (502)
IBM Informix (50)
Neo4j (82)
InfluxDB (0)
Apache CouchDB (44)
Firebird (5)
Database Management (1411)
Databases AllOther (288)