26.6k views
2 votes
If a schema is not given, you may assume a table structure that makes sense in the context of the question. (using sql queries)

Find all Employee records containing the word "Joe", regardless of whether it was stored as JOE, Joe, or joe.

User Aron C
by
5.3k points

1 Answer

7 votes

Answer:

The correct query is;

select * from EMPLOYEE where Employee_Name = 'JOE' or Employee_Name = 'Joe' or Employee_Name = 'joe';

where EMPLOYEE refer to the table name and type attribute name is Employee_Name

Step-by-step explanation:

Here, the first thing we will do is to assume the name of the table.

Let’s assume the table name is EMPLOYEE, where the column i.e attribute from which we will be extracting our information is Employee_Name

The correct query to get the piece of information we are looking for will be;

select * from EMPLOYEE where Employee_Name = 'JOE' or Employee_Name = 'Joe' or Employee_Name = 'joe';

User Nattfrosten
by
5.3k points