mysql - How to display rows from 2 different tables in sql? -
I have two separate tables.
Test1: 1,2, With 3, row elements up to 4 as 10 Test 2: As the row elements with A, B, C, D, j
I want to display results through a single query where the number of each alphabet from the table precedes And are omitted after strange numbers and other characters. Like, for this case, the result will be: 2a, 4c, 6e, 8g, 10i and 1,3,5,7,9 and B, D, F, H, J < / Code> will not be displayed.
I need to do this with a large table that does not have numbers or letters.
This can be useful for you, in SQL Server, change it to mysql
Enter the table #alpha (alpha varchar (25)) #alpha value ('A'), ('B'), ('C'), ('D'), ('E'), ('F') table number # numeral (numbers) # numeral numbers (1), (2), ( 3), (4), (5), (6) Selection Cast (varchar (25) as number dygits + + '+ alphabets.lafa your ridge FDR (number of digits greater than RAH_NUMBER) (number of digits as ID based on ID number)) Number of points Join INNER (select alpha by ACC) ID, alpha #alpha) Alphabets.id + 1 = Number.id where number of numbers% 2 = 0 drop table #alpha drop table number #
Output:
yourResult 2a 4c 6e
Comments
Post a Comment