E
E
Erik Mikoyan2020-07-24 04:07:41
JavaScript
Erik Mikoyan, 2020-07-24 04:07:41

How should a user query be searched?

Hello.
I have a sqlite database with objects that oddly enough have names. I work with it through sequelize. How can I search the database not by the whole name, but partially (by the first letter, for example)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
H
HemulGM, 2020-07-24
@erik_mikoyan

Learn a minimum of SQL DML.
And if for the lazy and impudent, then the selection according to the Where condition allows you to specify a mask. "... where 'name' like 'andy%'..."
In this case, those rows will be selected whose name field starts with 'andy'

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question