Friday, 18 October 2024

How do I delete LEFT JOIN rows that are NULL in mySQL?

 How do I delete LEFT JOIN rows that are NULL in mySQL?

If by "delete" you mean "don't show them in this query result" you can use an INNER JOIN instead of a LEFT JOIN. It's worth learning the different types of joins and how to use them.

If by "delete" you mean "DELETE the rows in my_order_delivery_address that have no matching my_order", you can do a multi-table DELETE:

DELETE a FROM mt_order_delivery_address AS a
LEFT JOIN mt_order AS o USING (order_id)
WHERE o.order_id IS NULL;

 

Modifying the "Path to executable" of a windows service

 

Modifying the "Path to executable" of a windows service

 

 

There is also this approach seen on SuperUser which uses the sc command line instead of modifying the registry:

sc config <service name> binPath= <binary path>

Note: the space after binPath= is important. You can also query the current configuration using:

sc qc <service name>

This displays output similar to:

[SC] QueryServiceConfig SUCCESS

SERVICE_NAME: ServiceName

    TYPE               : 10  WIN32_OWN_PROCESS
    START_TYPE         : 2   AUTO_START
    ERROR_CONTROL      : 1   NORMAL
    BINARY_PATH_NAME   : C:\Services\ServiceName
    LOAD_ORDER_GROUP   :
    TAG                : 0
    DISPLAY_NAME       : <Display name>
    DEPENDENCIES       :
    SERVICE_START_NAME : user-name@domain-name

Blog Archive