Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT title FROM books
- WHERE SUBSTRING(title,1,3) = 'THE' ORDER BY id;
- //SELECT title FROM books WHERE title LIKE 'The%' ORDER BY id;
- --------1
- UPDATE books SET title = REPLACE(title,'The','***')
- WHERE SUBSTRING(title,1,3) = 'The';
- SELECT title FROM books WHERE SUBSTRING(title,1,3) = '***' ORDER BY id;
- -------2
- SELECT SUM(cost) FROM books;
- --------3
- SELECT concat(`first_name`,' ',`last_name`) AS 'full_name',
- TIMESTAMPDIFF(DAY,`born`,`died`) AS 'days_lived' FROM authors;
- ----------4
- SELECT title FROM books WHERE title LIKE 'Harry%' ORDER BY id;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement