SQL Like
SQL Like Example One - Like with %
Select Film_Title From Film_Table Where Film_Title like "The Godfather%";
The Godfather The Godfather Part II The Godfather Part III
Select Film_Title From Film_Table Where Film_Title like "The Godfather*";
SQL Like Example #2 - Like with _
Select Director_Last_Name From Director_Table Where Director_Last_Name like "Copp_la";
Coppola
Select Director_Last_Name From Director_Table Where Director_Last_Name like "Copp?la";
| Comments Comments are left by visitors to FluffyCat.com, are not endorsed by FluffyCat.com, and may or may not be accurate. |
| Comment by TheMadProfessor Rate this Comment |
Regarding the questions about the 'links' field contaning multiple values delimited by semicolons, my suggestion is: forget it!
|
| Comment by Larry Rate this Comment |
If I understand the previous question correctly, this SQL with a like should do the trick:
|
| Comment by usha Rate this Comment |
hi everybody,
|
| Comment by archive Rate this Comment |
I have:
|
| Comment by Larry Rate this Comment |
I don't see an example anywhere that has another field as part of a like, but if this works on your dbms it might be what you need.
|
| Comment by archive Rate this Comment |
I did not design this. I have two tables, table A has a field "Link" that is of type string and contains a unique 30 character string (700 hundred of them). Table B contains a unique 28 character identifier, and a field that contains multiple 30 character unique identifiers (from table A) that are separated by a "semi-colon" in a field called A_Links. How do I select all from table B that contains a unique identifier from table A? As a separate record? Table B will have maybe 10-15 of the unique identifiers from table A. |
| Sign In |
| to add your own comment |