In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Card bin: the first six digits of the card number represent the card issuing bank identification code, also known as the BIN number. Different BIN numbers represent different bank card organizations and card levels.
Recently updated the card bin table data (bank_card_bin) of the system, found that the card bin length is not the above 6 digits, the card bin length is 8 digits (some 6 bits, some 7 bits, non-fixed length), as shown in the following table
Branch name card type card binka bin length organization code Wulat Central Banner Mengyin Village Town Bank Wulat Central Banner Mengyin debit Card 6213460781915142075 Mengyin debit Card 6213460781915142075 Mengyin debit Card 6213462681915142073 Mengyin debit Card 6213462481915142054 Tiemeng Yincun Town Bank, Ordos City Debit card 6213461181915142051 Sizi Wang Mengyin Village Bank Bank Mengyin debit Card 6213461381915142046
So how to query the specific card information according to the bank card number?
The initial idea is to capture the first six digits of the screenshot card number and limit the length of the card to query. If there is not only one returned result, continue to intercept the first 7 digits for query until only one returns the result. If there are 2 or more results, but there are 0 records in the further query, it is considered that the bin data of the card is not included. That is, recursive query. Suppose the card number is 6213462465616156, refer to sql as follows
Select * from bank_card_binwhere '6213462465616156' like' 621346% 'and length =' 19'
But it's too troublesome. How is it possible? In the communication and confirmation of colleagues, some changes can be made, as follows
Select * from bank_card_binwhere '6213462465616156' like concat (card bin,'%') and length =' 19'
Cleverly split the previous sql into two segments, and the card bin is not intercepted by the user's own judgment, but a match.
At the same time, this sql takes advantage of the feature that "card bin is unique", and there is no inclusion relationship, that is, there is no record of the following
* * Bank * Bank Mongolian Bank debit Card 6213466191514204
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.