mysql - How does the Like operator behave with an empty argument (%%)? -


using like operator

select first_name, last_name student_details first_name 's%'; 

will provide name start s.

but

select first_name, last_name student_details **first_name '%%';** 

%% - didn't have string constraints. query returning complete list.

how like %% processed in sql?

can clarify this?

the % sign considered zero-or-more repetition wildcard character in sql. way works pretty same in other areas of computing, can have wide definition , explaination of how works putting in google.

that's why returns all entries in database, because matches if isn't repeated time (by way, same behavior you'll achieve like '%').

the 1 , 1 repetition wildcard in sql represented _.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -