?
What is the number of attributes in the following SQL table?
What is the number of attributes in the following SQL table?
CREATE TABLE employee (
emp_name CHAR(30),
emp_id INT
);
CREATE TABLE employee (
emp_name CHAR(30),
emp_id INT
);
Answer & Solution
Correct Answer:
Option
B
This question is about understanding the structure of a table in a database. The code you see defines a table called "employee" with two columns:
emp_name: This column stores the name of the employee, and it can hold up to 30 characters (CHAR(30)).
emp_id: This column stores the employee's identification number as an integer (INT).
Since we have two columns (emp_name and emp_id), the correct answer is Option B: 2.
emp_name: This column stores the name of the employee, and it can hold up to 30 characters (CHAR(30)).
emp_id: This column stores the employee's identification number as an integer (INT).
Since we have two columns (emp_name and emp_id), the correct answer is Option B: 2.
Join the Discussion
Login to post a comment or share your explanation.
Login