<p>All the docs for SQLAlchemy give <code>INSERT</code> and <code>UPDATE</code> examples using the local table instance (e.g. <code>tablename.update()</code>... )</p>

<p>Doing this seems difficult with the declarative syntax, I need to reference <code>Base.metadata.tables["tablename"]</code> to get the table reference.</p>

<p>Am I supposed to do this another way?   Is there a different syntax for <code>INSERT</code> and <code>UPDATE</code> recommended when using the declarative syntax?  Should I just switch to the old way?</p>

[{'answer_id': 77962, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>via the <code>__table__</code> attribute on your declarative class</p>\n'}, {'answer_id': 156968, 'author': 'GHZ', 'author_id': 18138, 'author_profile': 'https://Stackoverflow.com/users/18138', 'pm_score': 3, 'selected': False, 'text': "<p>well it works for me:</p>\n\n<pre><code>class Users(Base):\n    __tablename__   = 'users'\n    __table_args__  = {'autoload':True}\n\nusers = Users()\nprint users.__table__.select()\n</code></pre>\n\n<p>...SELECT users.......</p>\n"}, {'answer_id': 315406, 'author': 'Paul Harrington', 'author_id': 40387, 'author_profile': 'https://Stackoverflow.com/users/40387', 'pm_score': 0, 'selected': False, 'text': '<p>There may be some confusion between <strong>table</strong> (the object) and <strong>tablename</strong> (the name of the table, a string). Using the <strong>table</strong> class attribute works fine for me.</p>\n'}]
['https://Stackoverflow.com/questions/75829', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/-1/']