Q1007
What is the number of attributes in the following SQL table? CREATE TABLE employee ( emp_name CHAR(30), emp_id INT );
A.
1
B.
2
AnswerC.
3
D.
30
Answer: Option B
Solution
Answer: Option B
Solution:
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.