ODBC Driver for Microsoft Teams

Build 23.0.8839

データのクエリ

接続 後、SQL ステートメントを実行して結果を取得できます。

SELECT プロシージャ

SQL を実行する前にカーソルを取得する必要があります。取得したら、カーソルのexecute メソッドを使用できます。

cursor = cnxn.cursor()
cursor.execute("SELECT subject, location_displayName FROM Teams WHERE Id = 'Jq74mCczmFXk1tC10GB'")

結果の反復処理

for loop を使用して、結果セットの行を反復することができます。各行はカラム値を含むタプルとして表示されます。

for (subject, location_displayName) in cursor:
    print("subject = {}, location_displayName = {}".format(subject, location_displayName))

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 23.0.8839