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
I am trying to insert some text data into a table in SQL Server 9. The text includes a single quote '. Ho
There is a table messages that contains data as shown below: Id Name Other_Columns ----------------------
Is there a way to make an Oracle query behave like it contains a MySQL limit clause? In MySQL, I can do this:
How do I query an Oracle database to display the names of all tables in it?
Both these joins will give me the same results: SELECT * FROM table JOIN otherTable ON table.ID = otherTable.
What is the best way to get IDENTITY of inserted row? I know about @@IDENTITY and IDENT_CURRENT and SCOPE_IDE
I understand the point of GROUP BY x. But how does GROUP BY x, y work, and what does it mean?
Using MySQL, I can do something like: SELECT hobbies FROM peoples_hobbies WHERE person_id = 5; My Output:
How can I reset the AUTO_INCREMENT of a field? I want it to start counting from 1 again.
Good Overviews Generally speaking, you're making a decision between fast read times (for example, nested
I need to update this table in SQL Server with data from its 'parent' table, see below: Table: sale
I want to delete using INNER JOIN in SQL Server 2008. But I get this error: Msg 156, Level 15, State 1, L
As the title suggests, I'd like to select the first row of each set of rows grouped with a GROUP BY. Spec
How do I perform an IF...THEN in an SQL SELECT statement? For example: SELECT IF(Obsolete = 'N' OR
I want to query something with SQL's like query: SELECT * FROM users WHERE name LIKE '%m%' Ho
How do I do a SELECT * INTO [temp table] FROM [stored procedure]? Not FROM [Table] and without defining [temp
SELECT GETDATE() Returns: 2008-09-22 15:24:13.790 I want that date part without the time part: 2008-09-22 0