The Queries in this page solved at the library database. It is a sample database generated by randomly records. You can download it from the link. You will see more than 500 examples in the future. You can filter from the search panel above by selecting sql statements. I hope you will like it

# SQL Like Examples

##### 1-) List the student whose name starts with "a" character

Solution 1)

``````Select * from students
where name like 'a%'``````

ETİKETLER

- - -
##### 2-) List the student which name ends "a" character

Solution 1)

``````Select * from students
where name like '%a'``````

ETİKETLER

- - -
##### 3-) List the student which name contains "a" character

Solution 1)

``````Select * from students
where name like '%a%'``````

ETİKETLER

- - -
##### 4-) List the books that's pageCount Column contains 5 number

Solution 1)

``````Select * from books
where bookId like '%1%'``````

ETİKETLER

- - -
##### 5-) List the students whose second character of name is a.

Solution 1)

``````Select * from students
where name like '_a%'``````

ETİKETLER

- - -
##### 6-) List the students whose second character of name from end is "a".

Solution 1)

``````Select * from students
where name like '%a_'``````

ETİKETLER

- - -
##### 7-) List the students whose name is "James" and surname dosn't contain "a" character

Solution 1)

``````select * from students
where name= 'James' and surname not like '%a%'``````

ETİKETLER

- - - -
Library Database 