Home > Articles

Like this article? We recommend 

Table Creation

Before we can manipulate some database data, we must create and populate some tables. Table creation is illustrated in Listing 9.

Listing 9 Table creation

s.execute("create table derbyDB(num int, addr varchar(40))");

Listing 9 illustrates the creation of a table called derbyDB. This table has two columns: an integer column and a variable character column. The latter can store strings of up to 40 characters in length. Let’s now get some data into the table.

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.