I find the answer that I need to use the utf_bin during the Column definition. Something like below:
code = Column(VARCHAR(10, collation='utf8_bin'), nullable = False) then I can get the case sensitive support from the query filter. DoDo於 2012年10月27日星期六UTC+8下午11時41分06秒寫道: > > I try to use the query with filter_by function to grab the data from a > table. But it can't get the correct return. > > session. query(testtable).filter_by(code = '1A') > session. query(testtable).filter_by(code = '1a') > > How should I specify the capital letter or lower letter in filter_by > function? > > > > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To view this discussion on the web visit https://groups.google.com/d/msg/sqlalchemy/-/GA9Iwl866I0J. To post to this group, send email to sqlalchemy@googlegroups.com. To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en.