Skip to content

To UNION or Not to UNION

I am currently running into an issue with my UNION clause. I am trying to figure out how many orders I am import via each day. The problem is, I have two tables that these orders are stored in OLDORDERHEADER and ORDERHEADER. After an order is completed, it moves from the ORDERHEADER table into the OLD. Both h…

Inserting data into MySQL from a dropdown

I’m trying to make a dropdown list that allows users to select a training program that matches their needs, so when they select it, the option will go into a table in the MySQL database. This is my HTML form: What I need is an SQL query that will go with it, so when they select ‘Example option 3&#…

Oracle: Count non-null fields for each column in a table

I need a query to count the total number of non-null values for each column in a table. Since my table has hundreds of columns I’m looking for a solution that only requires me to input the table name. Perhaps using the result of: to get the column names and then a subquery to put counts against each col…

MySQL SHOW TEMPORARY TABLES;

I’m learning SQL with MySQL 5.7. And I wanna enumerate all tables include temporary tables! But when I query SHOW TABLES; It shows only non-temporary tables. How can I list all tables?