Question

16. Consider the following statement: SELECT Firstname || ' ' || Surname FROM Employee WHERE INSTR(Firstname,...

16. Consider the following statement:

SELECT Firstname || ' ' || Surname FROM Employee WHERE INSTR(Firstname, 'm') > 0

What is displayed?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

16) SELECT Firstname || '' || Surname FROM Employee WHERE INSTR(Firstname, 'm') > 0

The above statement will return First name and Surname of employees separated by a space where the first name of the employee contains at least one 'm'.

Hope this helps.

Add a comment
Know the answer?
Add Answer to:
16. Consider the following statement: SELECT Firstname || ' ' || Surname FROM Employee WHERE INSTR(Firstname,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 15. Assume thatthe table EMP hasthe following data EmpNo Surname Firstname 1 Smith Fred 2 Jay...

    15. Assume thatthe table EMP hasthe following data EmpNo Surname Firstname 1 Smith Fred 2 Jay Emma 2 Phelps Mark Consider the following statement: SELECT Firstname || ' ' || Surname FROM Employee What is displayed?

  • Consider the following SQL statement: 'SELECT * FROM Employee E1, Employee E2 WHERE E1.managerId = E2.employeeId;'....

    Consider the following SQL statement: 'SELECT * FROM Employee E1, Employee E2 WHERE E1.managerId = E2.employeeId;'. This SQL statement is most likely associated with ________. Select one: a. A 1:1 binary relationship b. A N:M recursive relationship c. A 1:N binary relationship d. A 1:N recursive relationship

  • 2) Consider the database schema on the relations (where key attributes have been underlined): PROJECTS(Number, Department,...

    2) Consider the database schema on the relations (where key attributes have been underlined): PROJECTS(Number, Department, ProjectName) EMPLOYEES(Number, Surname, FirstName, Department) ALLOCATIONSEmplovee, Project, Function, Date) NOTE: relation ALLOCATIONS stores the registration number (attribute Employee) of employees that are assigned to a given project (attribute Project is the number of the project, not the name of the project), the function the employee has in that project (i.e., technician, manager, etc.) and the date when the employee has been assigned to that...

  • What is wrong with the following query? select firstname , lastname from Customer intersect select productid...

    What is wrong with the following query? select firstname , lastname from Customer intersect select productid , price , quantity from order_detail join orders on order_detail.orderid = orders.orderid; Group of answer choices 1 Nothing is wrong with this query 2 When working with set operators both queries have to contain the same number of columns. 3 The wrong set operator is being used. This query should use EXCEPT. 4 The wrong set operator is being used. This query should use...

  • QUERY EXAMPLE2 SELECTfrom Employee em (Refer to query example 2 to answer questions 12- 13) 12....

    QUERY EXAMPLE2 SELECTfrom Employee em (Refer to query example 2 to answer questions 12- 13) 12. You plan to join the Location table and fear there may be some employees with no location. You want to make sure that the query returns a list of all employee What join clause would you add to the query above? records. A. LEFT JOIN Location lo ON em.LocationlD lo LocationID B. RIGHT JOIN Location lo ON em.LocationID lo.LocationlD C. INNER JOIN Location lo...

  • How would I write the SQL statement SELECT fname AS First_Name, lname AS Last_Name FROM employee...

    How would I write the SQL statement SELECT fname AS First_Name, lname AS Last_Name FROM employee WHERE salary BETWEEN 10000 AND 30000; in relational algebraic syntax?

  • MYSQL Consider the sql statement "select * from t1 UNION t2" where t1 and t2 are...

    MYSQL Consider the sql statement "select * from t1 UNION t2" where t1 and t2 are two sets (tables). This query executes without any errors. Assume t1 has n columns. How many columns does t2 have? How many columns will the resultset have? Is it possible for the result set to have more records than the combination of t1 and t2 (for example say t1 has 8 records and t2 has 8 records) is it possible for the resultset to...

  • QUESTION B1. (7 marks) This question assumes the following relational schema Employee (employeeNumber, lastName, firstName, DOB,...

    QUESTION B1. (7 marks) This question assumes the following relational schema Employee (employeeNumber, lastName, firstName, DOB, HireDate, Position Salary, Dept) Primary Key: employeeNumber Foreign key: Dept refers to DeptID in Department Department (DeptID, DeptName, DeptLocation) Primary Key: DeptID You have been given the following MySQL stored procedure: CREATE PROCEDURE Find_EmployeeName (IN employeeNo INT (11), OUT employeeName VARCHAR (60)) BEGIN SELECT concat(firstName, '', lastName) INTO employeeName FROM employees WHERE employeeNumber employeeNo; END (a) (2 marks) Name the two types of parameters...

  • Given the following table (Authors table) AuthorID FirstName LastName 1 Paul Deitel 2 Harvey Deitel 3...

    Given the following table (Authors table) AuthorID FirstName LastName 1 Paul Deitel 2 Harvey Deitel 3 Abbey Deitel 4 Dan Quirk 5 Michael Morgano What does the following Query produce when executing on the above table: SELECT AuthorID, FirstName, LastName    FROM Authors    WHERE LastName LIKE 'D%'

  • Consider EMPLOYEE database. Create the database and run the following queries and write the result you...

    Consider EMPLOYEE database. Create the database and run the following queries and write the result you get. What would be the result of the following query (please create the resulting table will all the columns and rows)? SELECT                      D.Dname, E.Lname, P.Pname FROM                         DEPARTMENT D, EMPLOYEE E, WORKS_ON W, PROJECT P WHERE                      D.Dnumber=E.Dno AND E.Ssn=W.Essn AND W.Pno=P.Pnumber ORDER BY                 D.Dname DESC, E.Lname DESC;

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT