Do any versions of SQL Server support deferrable constraints (DC)? Since about version 8.0, Oracle has supported deferrable constraints – constraints that are only evaluated when you commit a statement group, not when you insert or update individual tables. Deferrable constraints differ from just disabling/enabling constraints, in that the constraints are still active – they […]
In SQL there are aggregation operators, like AVG, SUM, COUNT. Why doesn’t it have an operator for multiplication? “MUL” or something. I was wondering, does it exist for Oracle, MSSQL, MySQL ? If not is there a workaround that would give this behaviour?
I have 3 tables called: Applications (id, name) Resources (id, name) ApplicationsResources (id, app_id, resource_id) I want to show on a GUI a table of all resource names. In one cell in each row I would like to list out all of the applications (comma separated) of that resource. So the question is, what is […]
As I know, from the relational database theory, a select statement without an order by clause should be considered has not particular order. But actually in SQL Server and Oracle (I’ve tested on those 2 platforms), if I query from a table without an order by clause multiple times, I always get the results in […]
I know the usage of joins, but sometimes I come across such a situation when I am not able to decide which join will be suitable, a left or right. Here is the query where I am stuck. SELECT count(ImageId) as [IndividualRemaining], userMaster.empName AS ID#, CONVERT(DATETIME, folderDetails.folderName, 101) AS FolderDate, batchDetails.batchName AS Batch#, Client=@ClientName, TotalInloaded […]
In SQL I (sadly) often have to use “LIKE” conditions due to databases that violate nearly every rule of normalization. I can’t change that right now. But that’s irrelevant to the question. Further, I often use conditions like WHERE something in (1,1,2,3,5,8,13,21) for better readability and flexibility of my SQL statements. Is there any possible […]
i work with sql server, but i must migrate to an application with Oracle DB. for trace my application queries, in Sql Server i use wonderful Profiler tool. is there something of equivalent for Oracle?
Please clarify two things for me: Can a Foreign key be NULL? Can a Foreign key be duplicate? As fair as I know, NULL shouldn’t be used in foreign keys, but in some application of mine I’m able to input NULL in both Oracle and SQL Server, and I don’t know why.
What is the complete and correct syntax for the SQL Case statement?
What are the ways that you use to model and retrieve hierarchical info in a database?