Home > database >  Data table has two columns save check receipt number starting and ending the receipt number, how to
Data table has two columns save check receipt number starting and ending the receipt number, how to

Time:12-18

: (the first list a id int, check-out date datetime, cashier varchar, start check receipt number varchar, end checkout receipt number varchar)
Id, check-out date, cashier, began to check the receipt number, end checkout receipt number
2020110100001202110000, 1202-11-2025, 04 13:26:55 16
2020110100017202110000, 2202-11-2039, 04 17:05:44 35
3202-11-04 17:20:33 2075, 2020110100036202110000, 67

The second table b: schedule of fees, which contains the cashier and check your receipt number.

Select * from a, b where a. cashier=b. cashier and b. receipt number between a. start check receipt number and a. end checkout receipt number
Using the above method can achieve a goal, but slow, ask everybody have what good method,
  • Related