The SQL String concatenation function uses CONCAT () in the SQL String concatenation function. The CONCAT () syntax is as follows: CONCAT (string 1, string 2, string 3 ,...): concatenates string 1, string 2, string 3, and other words
The SQL String concatenation function uses CONCAT () in the SQL String concatenation function. The CONCAT () syntax is as follows: CONCAT (string 1, string 2, string 3 ,...): concatenates string 1, string 2, string 3, and other words
The SQL String concatenation function uses concat () in the SQL String concatenation function. The concat () syntax is as follows: concat (string 1, string 2, string 3 ,...): concatenates string 1, string 2, string 3, and other words. Note that oracle concat () only allows two parameters. In other words, only two strings can be connected at a time. However, in oracle, we can use '|' to concatenate multiple strings at a time.
Select region_name + ''+ store_name from geography
Where store_name = 'boston ';
Instance method
A:
Id value
1 111111111
2 222222222
3 333333333
Table B:
Id data
11-11111-11
10 22-22222-22
11 33-33333-33
Select * from a where substring (value, 1, 2) + '-' + substring (value, 3, 5) + '-' + substring (value, 8, 2)
Not in (select B from data );
Method 2
Select *
From
Where (substr (value, 0, 2) | '-' | substr (value, 2, 5) | '-' |
Substr (value, 8, 9) not in (select B from data );
Or directly update the value.
Update a set value = (substr (value, 0, 2) | '-' | substr (value, 2, 5) | '-' |
Substr (value, 8, 9 ));
If it is not oracle, replace substr with substring, | Replace with +