Does postgresql have O(1) lookups against the clustered index?

SQL
The questions are the following: Does postgresql (or other database implementations) have O(1) lookups against the clustered index? ie, a direct loo...
2 years ago

error code 1241 using MySQL

SQL
SELECT c.Staff_no, c.Start_datetime, c.End_datetime, s.First_name, s.Profession, s.Department, s.Gender FROM duty_roster_1501003f c, staff_1501003f s...
2 years ago

How can I fix Error code 1241 in MySQL

SQL
SELECT c.Staff_no, c.Start_datetime, c.End_datetime, s.First_name, s.Profession, s.Department, s.Gender FROM duty_roster_1501003f c, staff_1501003f s...
2 years ago

How to create an exe file & connect this with oracle DB

SQL
I need to create an .exe file & it should be connected with an Oracle 11g DB. scenario: suppose I have employee table in my Oracle DB. I want to...
2 years ago

SQL Server - merge two XML using only .modify()

SQL
Suppose we have: CREATE TABLE #Users(id INT PRIMARY KEY, name VARCHAR(100), suggestions XML); INSERT INTO #Users(id, name, suggestions) SELECT 1, 'B...
2 years ago

Distinct, order in 1 query

SQL
I have a downloads table that records each time a user downloads a file. I want to write a query that returns the most recent x downloads, but show a ...
2 years ago

Ruby on Rails - hidden tag not passing into the database

SQL
Really new to RoR, and ran into an issue I can't find the answer to anywhere. I have two tables, user and books, and I'm trying to use a join table ...
2 years ago

SQL Case Statement Syntax?

SQL
What is the complete and correct syntax for the SQL Case statement?
2 years ago

Agent job that emails from custom email table

SQL
I used to have triggers in my database that used cursors / sp_send_dbmail to email when certain columns were updated. I was told this was not best pr...
2 years ago

forum posts display loading slowly

SQL
I am new to php coding and am coding a website (with forums) to learn. Currently I have one dynamic page that handles all the forum aspects from disp...
2 years ago

Dynamic query using variable number of IN (p1, p2, p3) arguments

SQL
I have the following: Dim strdepToDelete As String Dim strOtherToDelete As String strdepToDelete = String.Join(",", depToDelete) strOtherToDelete = S...
2 years ago

Use (or not) of junction tables

SQL
I'm in the process of developping a small project for school, and I'm unsure on a design choice. Here is what I am trying to achieve : I have a tabl...
2 years ago

Mysql multiple Inner Joins not working

SQL
I have following query that is working fine in TSQL SELECT shoppingcart_1.price, shoppingcart_1.stid, course.isbn, book.BookTitle, cour...
2 years ago

PHP Weird output

SQL
<html> <head><title> Inpatient Search </title><head> <body> <h1> Inpatient Search </h1> <?php $w...
2 years ago

Handling DBNull and null in ASP.NET

SQL
What is the best way of rewriting these (erroneous) lines? bool? result = dr["result"] == DBNull.Value ? null : Convert.ToInt32(dr["result"]); ....
2 years ago

How to sort an alphanumeric column in MYSQL?

SQL
I have a column with values like below after ordering by it's column name (equipment_no) in ASC and was wondering how to sort it properly as shown in ...
2 years ago

Parallelism in PL/SQL

SQL
how can i run one query in pl-sql- in parallel? i need all the flow...
2 years ago

How to get row count using ResultSet in Java?

SQL
I'm trying to create a simple method that receives a ResultSet as a parameter and returns an int that contains the row count of the ResultSet. Is this...
2 years ago

Subtract two SUM GROUP BY fields

SQL
I have two tables itemOrders and itemUsage. itemOrders has two fields: item_number and qty_ordered itemUsage has two fields: item_number and qty_used...
2 years ago

While selecting data from database using following code

SQL
I have used this code to select data from table tbl_users but it is showing 1. what does it mean.. require_once('config.php'); $dbCon = getConnecti...
2 years ago