RosettaCodeData/Task/Table-creation-Postal-addresses/BASIC256/table-creation-postal-addresses.basic
2024-04-19 16:56:29 -07:00

18 lines
458 B
Text

# create a new database file or open it
dbopen "addresses.sqlite3"
# delete the existing table - If it is a new database, the error is captured
onerror errortrap
dbexecute "drop table addresses;"
offerror
# create the table
dbexecute "CREATE TABLE addresses (addrID integer, addrStreet string, addrCity string, addrState string, addrZIP string);"
# close all
dbclose
end
errortrap:
# accept the error - show nothing - return to the next statement
return