Computer Science
Which of the following types of table constraints will prevent the entry of duplicate rows?
- Unique
- Distinct
- Primary Key
- NULL
SQL Queries
1 Like
Answer
Primary Key
Reason — A primary key is a set of one or more attributes or fields that uniquely identifies a tuple or row in a table. Therefore, it ensures that each row in the table is unique and prevents the entry of duplicate rows.
Answered By
1 Like
Related Questions
Which clause is used in query to place the condition on groups in MySQL?
- WHERE
- HAVING
- GROUP BY
- Both (i) & (ii)
Which of the following is a DDL command?
- SELECT
- ALTER
- INSERT
- UPDATE
…………… command is used to remove primary key from a table in SQL.
- Update
- Remove
- Alter
- Drop
Which of the following commands will delete the table from MYSQL database ?
- DELETE TABLE
- DROP TABLE
- REMOVE TABLE
- ALTER TABLE