The statement that contains an error is option B. This statement is missing the FROM clause, which specifies the table or tables from which to retrieve data. The FROM clause is a mandatory clause in a SELECT statement, unless the statement uses a subquery or a set operator. The correct syntax for option B would be:
SELECT EmpId FROM employee WHERE EmpId=90030 AND DeptId=34
Copy
The other options are either correct or valid SQL statements. For example, option A selects the employee ID from the employee table where the employee ID is equal to 90030; option C selects all columns from the employee table where the employee ID is equal to 90030; option D selects the employee ID from the employee table without any filter condition. References: CompTIA DataSys+ Course Outline, Domain 1.0 Database Fundamentals, Objective 1.2 Given a scenario, execute database tasks using scripting and programming languages.
Contribute your Thoughts:
Chosen Answer:
This is a voting comment (?). You can switch to a simple comment. It is better to Upvote an existing comment if you don't have anything to add.
Submit