Skip to content

Tag: mysql

What is the correct syntax?

I wrote a sql query to update data of ‘tbl_products’. Here is the query update tbl_products set product_count = (product_count – tbl_order_details.product_sales_quantity) from tbl_products join …

MySql Select Statement (Other Company)

I am trying to select distinct users that are listed for other companies but not on my company (1). Here is an example From this table, I would like to get row 4 since he is in other company (not 1) but listed on others. I do not want others because they are listed on both my company and others.

convert full date string to date mysql

I have database which contains string like this 22 Jan 2019 11:03 I would like to convert this string to date so I apply this query select DATE_FORMAT(STR_TO_DATE(’22 Jan 2019 11:03′,’%d-%m-%Y’…