I’m trying to select rows, where the id_imported_urls is only present on the current user, but i cant figure out how to make the SQL call properly. Answer With NOT EXISTS: This will return a row only if id_imported_urls = 23965 does not exist for any user_id <> 4 . This query: returns all the id_imported_urls that belong to only
Tag: mysql
SQL: Update a table column with data in column retrieved from a view in same procedure
I’m trying to do a select and update within the same local procedure. The idea is to retrieve the number of ordered products from a specific order in the view (Produktantal) and then updating the stock numbers (antal) from the table “produktlager” with the data retrieved from the view. I’m receiving the follow error message Error: ER_BAD_FIELD_ERROR: Unknown column ‘Produktantal’
MySQL Query WHERE [closed]
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 2 years ago. Improve this question [Open this image][1] [1]: https://i.stack.imgur.com/GBQgV.png I try query, why cant one technition only? Query : Like this kode_ticket|tanggalbuat_ticket|tanggalapprove_ticket|tanggalfinish|nama_lapor|nama_teknisi|subject_ticket|detail_ticket|status_ticket|progress_ticket 0000000|20000000|10000000|5000000|Romauli Naibaho|Muklis 2|blabla|blabla|Progress|20 **SOLVED WITH : WHERE
SQL how to get total sum from all product rows without losing each product row from the view
I need to retrieve the total sum of all rows from this view, if I group by orderid the sum function works but then I lose each product row from the view and I don’t want that in this case. Is there a …
issue with INNER JOIN in MYSQL 6.3
im trying to join data from two tables like this: Select portt.nameport, tool.weapen From Portt Where portt.toolsum – ( select count(*) From tool …
SQL Select after character /
I’d like to select everything AFTER a certain character (/) that is placed on the most right side. I’v in CSV_COL(3) this text 200/100 or 50/10 ot 10/5 etc.. and i need to uso only number to the …
How to write a query that retrieves 3 replies for each user in my users table?
i want to display three replies from each user i have in my users table, so for instance if i have 3 users and each of them had replied to lets say 10 messages, i want my query to only retrieve 9 …
Display duplicate column with increasing count in separate coloumn in sql
I want to increase count in count column one by one if the same Id is found in records. Don’t consider about auto increment of Id. MySQL version 8.0 and you can order by name column. I tried but not getting any solution. My table Employee looks like this I want to run sql query which will give output like
How to unset or make condition true, If passed variable is empty or null
I have a query… if the $id is empty or null, then I need to get all data from table where id is not null I already tried like following, But looking for the better solution without if condition, because I have lot of and conditions Thanks in advance… Answer Thank you so much @Akina for the comment… Here is
List the films in which ‘Harrison Ford’ has appeared
Why is the answer to this question incorrect? Database Question: List the films in which ‘Harrison Ford’ has appeared My answer: Answer After correcting were -> where and removing the trailing X the syntax and result where correct. Error message indicated it was using MariaDB