What is MySQL equivalent of the Nz Function in Microsoft Access? Is Nz a SQL standard? In Access, the Nz function lets you return a value when a variant is null. Source The syntax for the Nz function is: Answer The COALESCE() function does what you describe. It’s standard SQL and it should be supported in all SQL databases. The
Tag: database
Database design for database-agnostic applications
What do I have to consider in database design for a new application which should be able to support the most common relational database systems (SQL Server, MySQL, Oracle, PostgreSQL …)? Is it even worth the effort? What are the pitfalls? Answer The short answer is to stick to features that are standardly, or close to standardly implemented. What this
How can I create database tables from XSD files?
I have a set of XSDs from which I generate data access classes, stored procedures and more. What I don’t have is a way to generate database table from these – is there a tool that will generate the …
Solutions for INSERT OR UPDATE on SQL Server
Assume a table structure of MyTable(KEY, datafield1, datafield2…). Often I want to either update an existing record, or insert a new record if it doesn’t exist. Essentially: IF (key exists) run …
How do I enforce data integrity rules in my database?
I’m designing this collection of classes and abstract (MustInherit) classes… This is the database table where I’m going to store all this… As far as the Microsoft SQL Server database knows, those are all nullable (“Allow Nulls”) columns. But really, that depends on the class stored there: LinkNode, HtmlPageNode, or CodePageNode. Rules might look like this… How do I enforce
Database Design for Revisions?
We have a requirement in project to store all the revisions(Change History) for the entities in the database. Currently we have 2 designed proposals for this: e.g. for “Employee” Entity Design 1: –…