If a query/subquery doesn’t find any matching rows, then it either returns NULL or no value at all, thus not even a NULL value. Based on what criteria does a query/subquery return a NULL and when …
How to find Expr#### in Execution Plan
When looking at the actual execution plan for a query in SQL Server Management Studio (SSMS), how do I determine what an expression such as Expr1052 represents? When I identify the costly parts of the query and look at the properties of that operation, there are often references only to these Expressions, or scalar operators. I want to be able
MySQL ON DUPLICATE KEY UPDATE for multiple rows insert in single query
I have a SQL query where I want to insert multiple rows in single query. so I used something like: The problem is when I execute this query, I want to check whether a UNIQUE key (which is not the PRIMARY KEY), e.g. ‘name’ above, should be checked and if such a ‘name’ already exists, the corresponding whole row should
What are NDF Files?
SQL Server uses MDF for data files and LDF for log files, but what are NDF files? Whats the benefits of these files?
can we list all tables in msaccess database using sql?
Can we find all tables in the msaccess using sql . as we do in sqlserver in sqlite Answer Use MSysObjects
Sql select rows containing part of string
I want to write a comparation procedure (t-sql) for site seo. I have a table with field ‘url’ (nvarchar()) that contain a part of site url’s. Ex: ‘mysyte.com/?id=2’. Also this table for each url contains metadata, that i need to extract. The main problem is that full url on site looks like ‘mysyte.com/?id=2®ion=0&page=1’, and i just need to ignore everething,
How to delete from a table where ID is in a list of IDs?
if I have a list of IDs (1,4,6,7) and a db table where I want to delete all records where ID is in this list, what is the way to do that? Answer Your question almost spells the SQL for this:
SQL Where clause conditional assignment based on another parameter
I need to generate a report where the user can choose All Issues, Open Issues, or Closed issues in a radio button. In my view I have a isClosed bit column. If I didn’t have the All Issues radio box I’…
How to Set Customer Table with Multiple Phone Numbers? – Relational Database Design
A customer can have multiple phone numbers e.g. Cell, Work, etc. phoneID in Customer table is unique and points to PhoneID in Phone table. If customer record is deleted, phoneID in Phone table should also be deleted. Do you have any concerns on my design? Is this designed properly? My problem is phoneID in Customer table is a child and
Unable to drop constraint in SQL server 2005, “Could not drop constraint. See previous errors”
I’m trying to drop a constraint on a DB table, something like: But the execution just runs and runs. If I stop it I see: Web search throws up various pages but note that the constraint is properly named and I am trying to remove it using the correct name Answer Found a way to sort this, although I don’t