+——+——+——+————+ | id | room | type | created_at | +——+——+——+————+ | 8214*| 83 | msg* | 1571726466 | | 8213 | 83 | msg* | 1571724983 | | 8212 | 83 | ad …
MySQL: Is it possible to set a variable outside of SELECT with SELECT as the only permission?
WHAT I’m on MySQL 5.6 and my account only has permissions for SELECT and USAGE (as found using the SHOW GRANTS command). Presumably because of this using DECLARE before SELECT returns a generic …
How to edit and delete rows of a database using ASP?
I currently have a website that displays all the data within the database Dim dcSQL As New SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings(“College”).ConnectionString) …
Postgres Dump Selected Rows
I have a database that has a central object that most of the data depends on; many reference table, one to many joins and many to many joins. I need to back up all rows based on a property in the central table and be able to restore these rows. For backup purposes. I have added ON DELETE CASCADE to
How to represent X and Y axis data in an SQL table
I have a table of data in excel that looks like this: I need to get this data imported into an SQL table. Eventually I need to be able to query the table by saying something like: Select the value where x-axis equals 762 and y-axis equals 889 – this should return 30.60. What is the best way to represent
The most efficient method of performing a large number of similar SELECT queries on PostgreSQL?
I have a set of large tables with many records each. I’m writing a Python program that SELECTs a large number of records from these tables, based on the value of multiple columns on those records. Essentially, these are going to be lots of queries of the form: Each table has a different set of columns, …
MySQL: Best way finding rows, where associated list match a given list
I built a SQL Statement, explained here: I have a table Account like this: I have a table Customer like this: I have a relation Customer_To_Account like this: I want to find all accounts which are assigned to customers in a given list like (111111, 222222). The returned accounts MUST contain at least one of t…
My SQL Python ProgrammingError: 1064 (42000) [closed]
Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Stack Overflow. Closed 2 years ago. Improve this question I am trying to store scraped data with scrapy to a sql database but I…
SQL computed column based on a special character on another column
I am not good with SQL at all, barely have an idea on how to do basic scripts suck as delete, drop, add. I have this data with about 12 columns, I want to add a calculated column which will change depending if a special character shows up in another column. lets say that is the idea, I want to
tricky SQL with substrings
I have a table (postgres) with a varchar field that has content structured like: The uuid can occur in more than one record. But it must not occur for more than one combination of [givenname];[surname], according to a business rule. That is, if the John Smith example above is present in the table, then if uui…