I am using Python and Postgrescill. I have a table with 6 columns, an ID and 5 entries. I want to copy the most repeated entry into ID and 5 entries in a new table.
I have done this:
Import psycopg2 connection = psycopg2.connect ("dbname = Homedb user = ria") cursor = connection.cursor () l_dict = { 'licence_id': 1} Karsr.aksikyut ( "SELECT * fROM im_entry.usr_table") rows = Karsrkfetchal () Karsr.aksikyut ( "INSERT iN Im_entry.pr_table (image_1d) of im_entry.usr_table" image_1d to line up in rows Select ": p = findmax (line) # to get the most repeated entry from the first table ................ ............. .... How can I put this table into a new value?
Please help me
P is a tuple to a new < Strong> Appeal with INSERT statement is going through a tuple (or part): cursor.exeocute (enter "new_table (x, ...) values ( % S, .. (%) (%) S, ...)% s repeats d for each column
Comments
Post a Comment