I have been very excited about MongoDb and have been testing it lately. I had a table called posts in MySQL wi
How can I add a new field to every document in an existent collection? I know how to update an existing docum
I would like to execute a following query: db.mycollection.find(HAS IMAGE URL) What should be the correct s
I am stuck between these two NoSQL databases. In my project I will be creating a database within a database.
Which one: datetime datetime2 is the recommended way to store date and time in SQL Server 2008+? I'm a
I want to query the name of all columns of a table. I found how to do this in: Oracle MySQL PostgreSQL But I a
I need to remove a highly referenced table in a SQL Server database. How can I get a list of all the foreign
I'll use a concrete, but hypothetical, example. Each Order normally has only one line item: Orders: Or
I have seen SQL that uses both != and <> for not equal. What is the preferred syntax and why? I like !=
My table is: id home datetime player resource 1 10 04/03/2009 john 399 2 11 04/03/2009 juliet 244 5 12 04/03/
We all know that to select all columns from a table, we can use SELECT * FROM tableA Is there a way to excl
I've been learning Functions and Stored Procedure for quite a while but I don't know why and when I
I want to search a text from all my database stored procedures. I use the below SQL: SELECT DISTINCT o.
What is the easiest way to save PL/pgSQL output from a PostgreSQL database to a CSV file? I'm using Pos
I want to add a row to a database table, but if a row exists with the same unique key I want to update the row
What is the main purpose of using CROSS APPLY? I have read (vaguely, through posts on the Internet) that cros
For simplicity, assume all relevant fields are NOT NULL. You can do: SELECT table1.this, table2.that, ta
I have a database with account numbers and card numbers. I match these to a file to update any card numbers to
How do I parameterize a query containing an IN clause with a variable number of arguments, like this one? SEL