Skip to content

Tag: postgresql

Run UPDATE query while the INSERTs are running

I have a DB table which size is around 100,000 rows. I Need to run an UPDATE query on that table (affecting every row) which runs for approximately 25 minutes. During this 25 minutes, there will be approximately 300 INSERTs to the same table. I’m wondering whether those INSERTs will run? Will they be bl…

Cannot figure out the issue with this SQL CASE

The issue i am facing is: “SYNTAX_ERROR: line 7:6: All CASE results must be the same type: boolean” I have also joined the table in a previous sub query casting it as a varchar, so there shouldn’t be any issues with this. Anyone have any ideas? For context i am trying to populate a field tha…

SELECT query without FROM clause with a million rows

I’m trying to generate a million rows for a database table using SQL. The logic for the columns is in place, but I’m not sure how to go about generating a large number of rows without having a FROM clause. I’m aware of how to write the SQL query without a FROM clause – select ‘a&…