Skip to content

Multiple LEFT JOIN in Access

I have the following query, which works for MySQL: But it doesn’t work for MS Access. I’ve tried to add parentheses around the LEFT JOIN, but it gives me syntax error in FROM clause. So how should this query look in order to work in MS Access? Answer The Access DELETE requires a star (*): DELETE *…

How to create trigger in informix?

I am trying to write a trigger like in the following simplified example: This fails! Only this works: What am I doing wrong? Answer I think you should write a stored procedure with the IF – THEN logic and call that from this trigger. I think triggers support only simple SQL statements, not SPL statement…

Oracle cascade delete

Is cascade delete on a table more efficient than individual delete statements (executed in a single plsql block) ? Answer What cascade delete does is issue individual delete statements. Examine the following test case: In the trace file, you will find a line like this: That is Oracle issuing a delete statemen…

Change PostgreSQL columns used in views

I would like PostegreSQL to relax a bit. Every time I want to change a column used in a view, it seems I have to drop the view, change the field and then recreate the view. Can I waive the extra protection and just tell PostgreSQL to let me change the field and then figure out the adjustment to the

Select something that has more/less than x character

Was wondering if it’s possible to select something that has more/less than x characters in SQL. For example, I have an employee table and I want to show all employee names that has more than 4 characters in their name. Here’s an example table Answer If you are using SQL Server, Use the LEN (Length…

sql getting information, but in wrong order

I have the following query in sql: a1 = the name I need the information in the table to output the names its queried in the order ive asked, so I need 40 to be first then 28 so on on. The reason for this is my code reads the results and stores in an array that then is used