Knowee
Questions
Features
Study Tools

Để thêm UNIQUE cho bảng NHAN_VIEN trên cột PHONE_NUMER, câu lệnh nào sau đây là đúng? "UPDATE TABLE NHAN_VIEN ADD CONSTRAINT NHANVIEN_UNQ_EMAIL UNIQUE (EMAIL);" "ALTER TABLE NHAN_VIEN CREATE CONSTRAINT NHANVIEN_UNQ_EMAIL UNIQUE (EMAIL);" "ALTER TABLE NHAN_VIEN ADD UNIQUE EMAIL " "ALTER TABLE NHAN_VIEN ADD CONSTRAINT NHANVIEN_UNQ_EMAIL UNIQUE (EMAIL);"

Question

Để thêm UNIQUE cho bảng NHAN_VIEN trên cột PHONE_NUMER, câu lệnh nào sau đây là đúng? "UPDATE TABLE NHAN_VIEN ADD CONSTRAINT NHANVIEN_UNQ_EMAIL UNIQUE (EMAIL);" "ALTER TABLE NHAN_VIEN CREATE CONSTRAINT NHANVIEN_UNQ_EMAIL UNIQUE (EMAIL);" "ALTER TABLE NHAN_VIEN ADD UNIQUE EMAIL " "ALTER TABLE NHAN_VIEN ADD CONSTRAINT NHANVIEN_UNQ_EMAIL UNIQUE (EMAIL);"

🧐 Not the exact question you are looking for?Go ask a question

Solution

Câu lệnh đúng để thêm UNIQUE cho bảng NHAN_VIEN trên cột PHONE_NUMER là: "ALTER TABLE NHAN_VIEN ADD CONSTRAINT NHANVIEN_UNQ_EMAIL UNIQUE (EMAIL);"

Similar Questions

Để thêm một cột EMAIL vào bảng SINH_VIEN, câu lệnh nào sau đây là đúng? "ALTER TABLE SINH_VIEN ADD COLUMN EMAIL VARCHAR(50) ;" "MODIFY TABLE SINH_VIEN INSERT COLUMN EMAIL VARCHAR(50) ;" "ALTER TABLE SINH_VIEN CREATE COLUMN EMAIL VARCHAR(50) ;" "ALTER TABLE SINH_VIEN INSERT COLUMN EMAIL VARCHAR(50) ;"

Charles is developing a travel booking system to manage customers, bookings, and payments. The system needs to handle three main types of data: CUSTOMERS, BOOKINGS, and PAYMENTS. To perform this the user needs to create the following tables with the mentioned constraints: symbol refers to the primary key NN refers to Not NULL After creating the tables, Charles needs to:Alter the CUSTOMERS table to change the primary key to Email to ensure each customer is uniquely identified by their email address.Drop the primary key from the BOOKINGS table as it is no longer required.Note: The user must write only the query to create, alter, and drop the table. The query to display the description of the table is already given.Input format :No console inputOutput format :The output displays the successful table creation status and the structure of all three tablesRefer to the sample output.Sample test cases :Input 1 :Output 1 :Table CUSTOMERS created.Table BOOKINGS created.Table PAYMENTS created.Table CUSTOMERS altered.Table CUSTOMERS altered.Table BOOKINGS altered. Name Null? Type _____________ ___________ ________________ CUSTOMERID NOT NULL NUMBER FIRSTNAME VARCHAR2(100) LASTNAME VARCHAR2(100) EMAIL NOT NULL VARCHAR2(100) Name Null? Type ______________ ___________ ________________ BOOKINGID NOT NULL NUMBER CUSTOMERID NUMBER BOOKINGDATE DATE DESTINATION VARCHAR2(100) Name Null? Type ______________ ___________ _________ PAYMENTID NOT NULL NUMBER BOOKINGID NUMBER AMOUNT NUMBER PAYMENTDATE DATE TABLE_NAME COLUMN_NAME POSITION STATUS _____________ ______________ ___________ __________ CUSTOMERS EMAIL 1 ENABLED 1 row selected.

Alter the USERS table to change the primary key to Email to ensure uniqueness based on email addresses.

eid ename esalary email dob1 XYZ 3000.89 [email protected] 1990-08-302 ABC 2300.90 [email protected] 1980-03-211] Write Query to insert 2 Records  in above table using single query.2]Write Query to update esalary to 4000.68 and dob to 1993-08-30  of employee whose eid is 1 in a single query.3] Write Query to delete all records from the table in single query.

Alter the CUSTOMERS table to change the primary key to Email to ensure each customer is uniquely identified by their email address.

1/1

Upgrade your grade with Knowee

Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.