Welcome to Scribd, the world's digital library. Read, publish, and share books and documents. See more
Download
Standard view
Full view
of .
Save to My Library
Look up keyword
Like this
8Activity
0 of .
Results for:
No results containing your search query
P. 1
SQLite Functions

SQLite Functions

Ratings: (0)|Views: 471 |Likes:
Published by pun_82b

More info:

Published by: pun_82b on Jun 25, 2010
Copyright:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

11/19/2011

pdf

text

original

 
SQLite functions
In this part of the SQLite tutorial, we will cover SQLite built-in functions. There are three types of functions in SQLite database. Core, aggregate and date & time functions.We will cover some functions from each group of SQLite functions.
Core functions
In this group we have various diverse functios. Some are numerical functions, some work with text.Others do some very specific things.
sqlite> SELECT sqlite_version() AS 'SQLite Version';SQLite Version--------------3.5.9
 The
sqlite_version()
function returns the version of the SQLite library.
sqlite> SELECT random() AS Random;Random-------------------1056892254869386643
 
 The
random()
function returns a pseudo-random integer between -9223372036854775808 and+9223372036854775807.
sqlite> SELECT max(cost) FROM Cars;max(cost)----------350000sqlite> SELECT min(cost) FROM Cars;min(cost)----------9000
In our example, the
max()
and
min()
functions return the most and the least expensive cars from theCars table.
sqlite> SELECT upper(name) AS 'Names in Capitals' FROM Friends;Names in Capitals-----------------JANE
 
THOMASFRANKLINELISABETHMARYLUCYJACK
 The
upper()
function converts characters into upper-case letters.
sqlite> SELECT length('ZetCode');length('ZetCode')-----------------7
 The
length()
function returns the length of a string.
sqlite> SELECT total_changes() AS 'Total changes';Total changes-------------3

Activity (8)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
iman_himawan liked this
Jawwad Farooq liked this
carbonmetrics liked this
martin_simon liked this
Decebal Dobrica liked this
Ben Valkyrie liked this

You're Reading a Free Preview

Download
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->