Skip to content
Advertisement

Tag: mysql

SQL BETWEEN for text vs numeric values

BETWEEN is used in a WHERE clause to select a range of data between two values. If I am correct whether the range’s endpoint are excluded or not is DBMS specific. What I can not understand in the following: If I have a table of values and I do the following query: The query returns as results rows including calories

MySQL concatenation operator

I don’t know concatenation operator for MySQL. I have tried this code for concatenation: SELECT vend_name || ‘ (‘ || vend_country || ‘)’ FROM Vendors ORDER BY vend_name; But it didn’t work. Which …

How to sync two MySQL tables?

If I have a table (lets call it orders) on one server of mine, named, for example, local. And I have this same table one another server of mine, named, for example, remote. My problem is, what is the best way to sync these two tables? I would like a solution that replaces a registry if the local is different

MySQL INSERT INTO … VALUES and SELECT

Is there a way to insert pre-set values and values I get from a select-query? For example: I have the value of “A string” and the number 5, but I’ve to find the [int] value from a select like this: that gives me that id to put inside table1. How to merge this into one statement? Answer Use an insert

mysql change all values in a column

I want to change all values in the tablecolumn “Quellendatum”. When the row-value is 2005-06-20 then it should be replaced with 2012-06-20. When the row-value is NULL or empty, then it should be …

Advertisement