Hi, John

SQLITE have the SQL syntax in the helper page(http://www.sqlite.org/lang.html), I 
donot think most of the SQL statement will work in SQLite. 

Xuezhang.

-----Original Message-----
From: John Mistler [mailto:[EMAIL PROTECTED] 
Sent: Sunday, August 01, 2004 8:03 PM
To: [EMAIL PROTECTED]
Subject: [sqlite] SQL Commands Again


I posted this a few days ago and didn't get any responses.  I thought I would try once 
more.  My question is whether any of these queries will work in sqlite, as I have used 
them in MySQL.  I can't tell from the documentation.  Thanks for any help (if on even 
just a few of them) --

1. REPAIR TABLE tableName EXTENDED

2. SELECT DATE_FORMAT(dateColumn, '%m/%d/%y') FROM theTable WHERE dateColumn BETWEEN 
SUBDATE(CURDATE(), INTERVAL 1 DAY) AND CURDATE()

3. SELECT t1.rowID, t2.rowID FROM tableName1 AS t1, tableName2 AS t2 WHERE 
t1.theColumn = t2.theColumn AND LENGTH(t1.theColumn) = LENGTH(t2.theColumn) AND 
t1.rowID > t2.rowID

4. SELECT COUNT(*) FROM theTable WHERE someColumn = 'someString'

5. OPTIMIZE TABLE theTable

6. SELECT DISTINCT(theColumn) FROM theTable

7. INSERT IGNORE INTO theTable VALUES ('someString', NULL)

8. UNLOCK TABLES

9. LOCK TABLES theTable READ

10. SELECT rowID, anotherColumn INTO OUTFILE path/to/file FROM theTable

11. LOAD DATA INFILE path/to/file INTO TABLE theTable

12. INSERT theTable (oneColumn, anotherColumn) SELECT oneColumn, anotherColumn FROM 
theTable WHERE rowID = 5

Thanks,

John

Reply via email to