sql - How to create a table from the attributes of another table that contain a key word? -


i have sql table called scuba_classes attributes id , name. in table different kinds of scuba diving classes beginner advanced levels. there second table called required_books has attributes id , title contain books required different scuba classes.

i'd create new table called intro_requirements attribute id. contain list of books required scuba classes name starts word "introduction". how create this?

so far have:

create table intro_requirements select scuba_classes.id scuba_classes, required_books scuba_classes.id = required_books.id; 

i can generate list of classes required books can't figure out how add requirement name of class has start "introduction".

add 1 more condition in clause using using , and search name using like.

create table intro_requirements select scuba_classes.id scuba_classes, required_books scuba_classes.id = required_books.id , name "introduction%"; 

Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -