SQL Interview question

Question

Write a query to get all the student with name length 10, starting with K and ending with z

solved 3
Xtramous 55 years 25 Answers 2966 views Contributor 0

Answers ( 25 )

  1. select name from student
    where length(name)=10 and name like ‘K%’ and name like ‘%z’

  2. select name from student where len(name)=10 and name like ‘K%’ and name like ‘%z’

  3. Sorry it a private answer.

    3

    select name from student where length(name)=10 and lower(name) like ‘k%z’

    Best answer
  4. SELECT name
    FROM student
    WHERE LEN(name)=10
    AND
    name LIKE ‘K%’ AND name LIKE ‘%z’ ;

  5. select name from student
    where length(name)=10 and lower(name) like ‘k%z’

  6. Select name from student where length(name) = 10 and upper(name) Like ‘K%Z’

    0

    select name
    from student
    where length(name) = 10 and
    upper(name) like ‘K%Z’

  7. select name from student where len(name)=10 and lower(name)=’k%z’;

  8. SELECT name FROM students
    WHERE LENGTH(name) = 10 AND name LIKE ‘K%z’

  9. Select * from Students
    Where Name like ‘K________z’

  10. SELECT name FROM student
    WHERE length(name)=10 and UPPER (name) like ‘K%Z’

  11. select name from student where (name like ‘K%z’) and (length(name)=10);

  12. SELECT name FROM student
    WHERE length(name) =10 AND lower(name) LIKE ‘k%z’

  13. select name from student
    where length(name)=10 and lower(name) like ‘k%’ and lower(name) like ‘%z’;

  14. select name,
    from student,
    where length(name) = 10 and lower(name) like ‘k%’ or lower(name) like ‘%z’

  15. Sorry it a private answer.

  16. SELECT name FROM student WHERE LENGTH(name)=10 AND name LIKE ‘K%z’

  17. select name
    from student
    where length(name)=10 and lower(name) like ‘k%z’;

  18. Write a query to get all the student with name length 10, starting with K and ending with z

    SELECT name
    FROM student
    WHERE length(name)=10 AND LOWER(name)=”k%z”;

  19. SELECT name
    FROM student
    WHERE LENGTH(name) = 10 AND name LIKE ‘K%z’

  20. SELECT name
    FROM student
    WHERE length(name)=10 AND LOWER(name)=”k%z”;

  21. Sorry it a private answer.

  22. Select name FROM student WHERE length(name)=10 AND LOWER(name) LIKE “k%z”

  23. SELECT name
    FROM student
    WHERE length(name)=10 AND LOWER(name) LIKE ‘k%z’

Leave an answer

Browse
Browse