Skip to content

Tag: sql

check if value is available in DB or not

I have a table which has the schema: i need a query for the report which contains whether the name i give exists in the DB . the name AD,BC,CA should be given by me and its not in any other table. Thanks in advance Answer Use an outer join against a values list:

How to join queries with a subquery?

So I’m a total newbie trying to solve this exercise where I have to find all the dishes that are marked as Vegetarian but contain Turkey meat in their ingredients. This is what I’ve tried (this is where I inner join 3 tables to find the ingredients): this is where I can’t seem to be able to …

SQL query with dynamic parameters

I tried to get some data from DB. I need get account information from my table – this type of information will depend on User. If he/she will insert account type = 1 -> he will get this information. How could I create query if it will depend on user: for example user could choose one or more account …