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 |
How to generate random numbers with the rand() function in ms sql server?
What is simple indexing method?
How to call a function from a stored procedure in SQL Server ?
Does dbcc checkdb requires db to be in single_user mode? : sql server database administration
what is sql injection in sql server?
Which is better in performance - CONSTRAINT or TRIGGER over a column which restricts say an input of particular value in a column of a table?
In which format does an image save in SQL Server database ?
what are user defined datatypes and when you should go for them? : Sql server database administration
What are scalar functions?
what is lazy writer?
How to retrieve error messages using mssql_get_last_message()?
Why I am getting this error when renaming a database in ms sql server?
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)