While retrieving foreign keys information from MySQL (for a code generator) I noticed this strange behavior. It looks like a major bug in MySQL 8.x. When I create a foreign key using REFERENCES the …
count(*) doesn’t return 0
i have a sql problem ,please help me this is my query select count(category_value .list_value_id) as jobs , category_type.value as category from list_values category_type full outer join params …
MySQL require a minimum length
I’m using MySQL Workbench and I made a table called ‘organizations’ and want to block any try of adding a value to a column with less than 5 letters. The column name is ‘namee’. I made this, but I get an error: Error: Answer Based on the error message you shared, you apparently t…
SQL statement to select all dead people
I have tables: City: zip, name,… People: id, city_zip(refers to city.zip), born_time, dead_time I need to select data about cities where ALL people from that city are dead: born_time NOT NULL AND …
Join two table with Multiple cases in ON condition
I have two tables A and B and I have to perform left join on that with multiple cases in on condition. Is there any efficient way of doing this in big query or SQL. Here my main motive is that for one row if my case1 matches than it will not go into other cases. Likewise it will work
How to loop through table using while loop and create another table with values needed
I have two tables: MainTable and MyTable. MyTable has unique ControlNo and ID. I need to add very first EffDate from MainTable to MyTablebased on ID and ControlNo. For that I need to look at …
Replace blank value with a default value in SQL
i have the below query which return blank values for the column property_value : select target_name,target_type,property_name,property_value from oracle_properties where target_name like ‘DY01EPI%’ …
Oracle: Need to commit after CREATE OR REPLACE FORCE EDITIONABLE VIEW
Silly question, but I can’t remember how this works. Need to commit after a CREATE OR REPLACE FORCE EDITIONABLE VIEW command? Answer No, DDL statements automatically commit in Oracle
Select person in a table having a specific value but not having another value for same id
I tried for hours and read many posts but I still can’t figure out how to handle this request: I have a table like this: +——+——+——+ |PERSON|TRTYPE| ID | +——+——+——+ |JERRY | I …
SQL: database design [closed]
I need some advice on designing a sql database schema. I get an excel sheet every month in the following structure. I would like some advice on how I can implement the table structure keeping in mind …