I have got two tables: category and quiz In category I have : category_id | category_name | In quiz I have : quiz_id | quiz_name | quiz_category_id| quiz_duration As you can notice, …
Can only find table in Oracle SQL when surrounding the table name with double quotes. Why?
I’m having the following weird issue with Oracle SQL. I have a table called schema_version, but I can’t run simple selects over it: > SELECT * FROM schema_version; ORA-00942: table or view does …
What is this query supposed to do? (and why does it fail?)
I’m tasked with revive this old piece of legacy software. It used to run on an old server (2012) which has died the ugly way (hard disk failure). Before this server died, the code worked without problems. I’ve rebuild the MySQL database and data from backups. However, one query is does not work and fails with error: Query preparation failed:
Count not null in sql
I have a table A with column data: I want to get a count of the invalid and blank(—). I tried : but it doesn’t work. Can someone please help me figure out what I am doing wrong here? Answer This should work as well.
MYSQL Update all foreign key values
I have two identical tables that are located in two identical databases(with different name). I want to merge these two tables, but their primary keys are used in other tables, these tables look …
SQLQuery.list() returns the same entries
In my java code I have written like this. This query returning same records again and again. But in database I have only single record. String queryString = “select e.business_event_id, e.event_name …
DB2 add auto increment column to an existing table
I have a table with following schema in my DB2 database. CREATE TABLE IDN_OAUTH_CONSUMER_APPS ( CONSUMER_KEY VARCHAR (255) NOT NULL, CONSUMER_SECRET VARCHAR (512), USERNAME …
Filtering with Joins – Rails
I have two models Product and ProductProperties. So, I store the properties for products in the Product Properties model which is associated with another model Properties How can I implement a scope …
SELECT hex(name || age) AS X FROM Ages ORDER BY X
I am taking a Cousera course talking about SQL and there is one line of code I cannot understand. What does it mean by ‘hex(name || age)’? I know it turns the string into hexadecimal format using the …
Convert positive data into negetive data (entire column) in Postgres Server
The current data in my table is: a b ——— -1 5 -11 2 -5 32 My request is to convert every data of column a into negative value. But how to update the positive values into the …