हिंदी
तमिलनाडु बोर्ड ऑफ सेकेंडरी एज्युकेशनएचएससी विज्ञान कक्षा १२

Give a python statement Using the where clause. - Computer Science

Advertisements
Advertisements

प्रश्न

Give a python statement Using the where clause.

टिप्पणी लिखिए
Advertisements

उत्तर

import sqlite3
connection = sqlite3.
connect(“Academy, db”)
cursor = connection. cursor()
cursor, execute (“SELECT DISTINCT (Grade) FROM student where gender=’M'”)
result = cursor. fetchall()
print(*result, sep=”\n”)

OUTPUT:

(‘B’,)
(‘A’,)
(‘C’,)
(‘D’,)

shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 15: Data manipulation through SQL - Evaluation [पृष्ठ ३१८]

APPEARS IN

सामाचीर कलवी Computer Science [English] Class 12 TN Board
अध्याय 15 Data manipulation through SQL
Evaluation | Q 3. b. | पृष्ठ ३१८
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×