I have two tables with many to one realtion. I want to sort data in table “user” by column “street” that is in “address” table in ASC or DESC direction defined by request param: localhost:8080/…
Is there a way to search for a matching string with multiple variants in a column?
I have a table that contains the colum “CompanyName”. I want to get all rows that mach with a specific string. +—-+———————-+——————-+———+———+ | Id | CompanyName …
How to retreive one single value in comma separated columns form, from a table in sql server?
I have a column with values like the one below. I need to separate value number 10 from each row in SQL sever (being value 1 the first one in the string, second after the first comma and so on). …
How do I select the max(timestamp) from a relational mysql table fast
We are developing a ticket system and for the dashboard we want to show the tickets with it’s latest status. We have two tables. The first one for the ticket itself and a second table for the …
Spring Data JPA Native SQL Query DELETE SQL Query
I use @Modifying annotation together with @Query annotation to perform SQL DELETE query and delete the record from a database table. @Modifying @Query(value = “DELETE FROM CUSTOMERS where CUSTOMERS….
ajax outputs only the last record from the loop forEach
ajax the request displays only the last record from the loop, the code below: $.ajax({ method: “POST”, url: “{{asset(‘/num’)}}”, dataType: “…
How to make SQLite query where both parameter and value are variables?
I’m trying to allow the user to search a SQL table, by first taking their input on which PARAMETER they want to search by, and after that taking their input on which VALUE they want to search for …
SQL: how to use row_number() function to assign the same number for rows with duplicate ids in a repeating format
I have a table with two columns personid and taskid and want to use the ROW_NUMBER function to add a row that counts up to 3 but will duplicate the number as it counts if there are multiple rows for a …
Query taking too long to respond
I have php list of items. I am fetching a array from my sql database. It was working ok but recently records are increasing and suddenly it is not showing records in list. Suggest! I have tried …
In SQL, how to remove from only 1 table from 2 related tables
I have related tables in SQL (one to many). One is employees table and the other is the record table for day offs, When i want to delete one employee I get the below error in C#: SqlException: The …