擅长:python、mysql、java
<p>不要使用引号,使用<code>[</code>和<code>]</code></p>
<pre><code>sqlite> create table blah (name text);
sqlite> select "something" from blah;
sqlite> select "name" from blah;
sqlite> insert into blah values ('hello');
sqlite> select "something" from blah;
something
sqlite> select "name" from blah;
hello
sqlite> select [something] from blah;
Error: no such column: something
sqlite> select [name] from blah;
hello
sqlite>
</code></pre>
<p>尝试以编程方式混淆:</p>
<pre><code>import re
from itertools import cycle
s = 'select "something" from blah;'
sel, cols, rest = re.match(r'(select)\s+(.*?)\s+(from\s+.*)', s).groups()
cols = re.sub('"', lambda g, I=cycle('[]'): next(I), cols)
print ' '.join( (sel, cols, rest) )
# select [something] from blah;
</code></pre>