Skip to content

Tag: sql-server

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 …

SQL update with more than 2 records

I’m trying to update column in this table: Expected result: And this is my update query – I get an error and I’m not sure where the issue comes from. Thank you. Error Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when…