Erinevus lehekülje "Sqlite" redaktsioonide vahel
Allikas: Kuutõrvaja
15. rida: | 15. rida: | ||
sqlite3 fail_info.db | sqlite3 fail_info.db | ||
− | info lisamine reaga | + | info lisamine reaga mille syntaks |
sqlite3 fail_info.db "insert into algandmed(...) values(...)" | sqlite3 fail_info.db "insert into algandmed(...) values(...)" | ||
+ | |||
+ | tabeli algandmed loomine | ||
sqlite3 fail_info.db "Create table algandmed(number integer,name text);" | sqlite3 fail_info.db "Create table algandmed(number integer,name text);" | ||
+ | |||
+ | tabelisse algandmed info lisamine | ||
sqlite3 fail_info.db "Insert into algandmed values('Root', 'shell');" | sqlite3 fail_info.db "Insert into algandmed values('Root', 'shell');" | ||
+ | |||
+ | lugemine tabelist algandmed read | ||
sqlite3 fail_info.db "Select * from algandmed;" | sqlite3 fail_info.db "Select * from algandmed;" |
Redaktsioon: 18. oktoober 2006, kell 09:31
SQlite tutvustus
SQlite http://www.sqlite.org/ andmebaas on v2ike ja ei vaja konfigureerimist on kasutatav kergelt k2surealt ning sellega sobib kenasti skriptide loomiseks hoides samas v2ga suuri infohulki
kasutada saab ka ruby on rails'iga http://wiki.rubyonrails.com/rails/pages/HowtoUseSQLite
selles palas vaatame kuidas kasutada k2surealt andmebaasi sama teema pikem ingliskeelne tekst http://www.sqlite.org/sqlite.html
kasutamine
andmebaasi loomine
sqlite3 fail_info.db
info lisamine reaga mille syntaks
sqlite3 fail_info.db "insert into algandmed(...) values(...)"
tabeli algandmed loomine
sqlite3 fail_info.db "Create table algandmed(number integer,name text);"
tabelisse algandmed info lisamine
sqlite3 fail_info.db "Insert into algandmed values('Root', 'shell');"
lugemine tabelist algandmed read
sqlite3 fail_info.db "Select * from algandmed;"
Joel Jans 2006