Company: ZS Associates BTSA
Difficulty: medium
There is a table "Students" in a database with columns StudentId, StudentName and Class. The StudentName column contains full name of students. Which of the following queries can be used to fetch only the first name? SELECT SUBSTRING(StudentName, 1, CHARINDEX(' ', StudentName)) FROM Students; SELECT SUBSTRING(StudentName, 0, CHARINDEX(' ', StudentName)) FROM Students; SELECT SUBSTRING(0, StudentName, CHARINDEX(' ', StudentName)) FROM Students; SELECT SUBSTRING(1, StudentName, CHARINDEX(' ', StudentName)) FROM Students; Given the columns in the EMPLOYEES table and the following SQL query: EMPLOYEES table columns: LAST_NAME VARCHAR2 (25), SALARY NUMBER (8, 2), COMMISSION_PCT NUMBER (6) Query: SELECT LAST_NAME, SALARY * COMMISSION_PCT FROM EMPLOYEES WHERE COMMISSION_PCT IS NOT NULL; How many of the following results will be achieved by the query? A. Display the salary multiplied by the commission_pct B. Exclude employees with a zero commission_pct C. Display a zero for employees with a nu