RUVIDEO
Поделитесь видео 🙏

Filter Column Data according to another Table Column | SQL | Oracle ExpressEdition Tutorials

Learn to filter a table's column data in output based on another table's column data.

How is this done?
-- Using the LIKE operator when we have to deal with strings (char/varchar/varchar2).

Here's the query:
-----------------------------------------------------------------------------------------------------------
select emp1.empid, empname, dept1.deptid, dept1.city
from dept1 inner join emp1
on(emp1.deptid = dept1.deptid)
where dept1.city in (select emp1.city from emp1)
or dept1.city like (emp1.city || '%');
-----------------------------------------------------------------------------------------------------------

Here the tables are joined using the inner join on the department IDs as they are not related by the foreign key constraint.

The LIKE Operator and the wildcard character % helps to filter the string data here.

The first section of the where clause is to filter the exact names of cities. Removing this will remove 'california' from the result.

This can be very useful to filter candidate names or locations or any string data which is present in two tables.


Hop on to learn more!
Subscribe to my channel to learn new Oracle/SQL tips and tricks to obtain a particular output.

Use the Oracle Express Edition for quick learning!

Check out my other videos:
--------------------------------------------------
Clone an Oracle table using SQL: https://youtu.be/8MICKuNoT1w

Add Primary Key to Existing Table: https://youtu.be/DgGoedEBLoU

Create an Application Workspace: https://youtu.be/Tl9hddgUSdI


Download the latest Oracle Express Edition release here:
http://www.oracle.com/technetwork/database/database-technologies/express-edition/downloads/index.html

Follow me on Instagram: https://www.instagram.com/the_perfect_tutorials/

Follow me on Facebook: https://www.facebook.com/theperfecttutorials

Sound: Bensound

Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Filter Column Data according to another Table Column | SQL | Oracle ExpressEdition Tutorials», вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.

Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.

Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!

Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.