Q:

How can I insert values?

c.execute("INSERT INTO service%s (name) VALUES (%s)" %service_id %self.name)

TypeError: not enough arguments for format string
I have a services1, services2, ... sql tables and I want to insert name values to this table. I try this code but not work.

A:

Your syntax is incorrect, try this:
c.execute("INSERT INTO service%s (name) VALUES (%s)" %(service_id, self.name))

A better & cleaner approach is to
1st save your query under a variable e.g: 
query = '''INSERT INTO service{0} (name) VALUES ({1})'''.format(service_id,self.name)
Then:
c.execute(query)
But also to avoid sql injection you might go for the '?' in your sql query.

