Jump to content

Table creation: Difference between revisions

m (→‎{{header|C}}: Remove vanity tags)
Line 344:
 
If you want a persistent instance of any of these types, you need to declare the name with some scope constraint, but the are no prerequisites to creating instances. Simply assigning values to them will call them into existence.
 
=={{header|Phix}}==
{{libheader|SQLite}}
<lang Phix>include pSQLite.e
constant sqlcode = """
CREATE TABLE IF NOT EXISTS employee (
empID INTEGER PRIMARY KEY AUTOINCREMENT,
firstName TEXT NOT NULL,
lastName TEXT NOT NULL,
age INTEGER NOT NULL,
dob DATE NOT NULL)"""
sqlite3 db = sqlite3_open("employees.sqlite")
integer res = sqlite3_exec(db,sqlcode)
if res=SQLITE_OK then
sqlite3_close(db)
else
printf(1,"sqlite3_exec error: %d [%s]\n",{res,sqlite_last_exec_err})
end if</lang>
 
=={{header|PL/I}}==
7,805

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.