Good SQL Statement Reference?
- Sergeant Thorne
- DBB Material Defender
- Posts: 4641
- Joined: Sun Nov 25, 2001 3:01 am
- Location: Indiana, U.S.A.
Good SQL Statement Reference?
I've recently switched from ASP to PHP; particularly, right now, I'm looking into using a Microsoft Access database through PHP. I was a little frustrated at first with the apparent lack of any 'insert' command in any of the ODBC-compatible database function groups built into PHP, but I think I've pick up that it's possible to insert entries through executing an SQL statement (odbc_exec(), dbx_query(), or any other functions that allow for it). My question is, are there any good SQL Statement syntax reference resources online? Thanks a lot!
Um... why would you use Access through PHP? ODBC is incredibly slow, and Access doesn't support anywhere near all the features of a true RDBMS. Instead, use MySQL, available for free from http://www.mysql.com .
But if you're really hell-bent on using Access, ALWAYS use SQL statements. They're much faster and much more flexible. Here's the syntax for an INSERT command:
<tt>INSERT INTO table_name (first_field_name, second_field_name, ...) VALUES (first_field_value, second_field_value, ...)</tt>
The Access help file has a complete reference for all the SQL keywords that Access supports.
But if you're really hell-bent on using Access, ALWAYS use SQL statements. They're much faster and much more flexible. Here's the syntax for an INSERT command:
<tt>INSERT INTO table_name (first_field_name, second_field_name, ...) VALUES (first_field_value, second_field_value, ...)</tt>
The Access help file has a complete reference for all the SQL keywords that Access supports.
- Sergeant Thorne
- DBB Material Defender
- Posts: 4641
- Joined: Sun Nov 25, 2001 3:01 am
- Location: Indiana, U.S.A.
Thank you very much, DCrazy. I had always been under the impression that MySQL was a very expensive piece of software (perhaps I was thinking of the Microsoft product). To find that this is free for my uses is great!
I'm going to be tinkering with SQL queries in ODBC until I get the MySQL Server that I downloaded set up. I have been diving into a lot of new things, having recently replaced my IIS with Apache 2.0, ASP with PHP, and now Access DBs with MySQL (though my experience with Access DBs doesn't run very deep). But, I very much prefer the PHP language to JavaScript/JScript (wish I could use it on client-side ), and I'm looking forward to using MySQL, which, I hear, and have seen to some degree, is very convienient/powerful.
Thanks again.
I'm going to be tinkering with SQL queries in ODBC until I get the MySQL Server that I downloaded set up. I have been diving into a lot of new things, having recently replaced my IIS with Apache 2.0, ASP with PHP, and now Access DBs with MySQL (though my experience with Access DBs doesn't run very deep). But, I very much prefer the PHP language to JavaScript/JScript (wish I could use it on client-side ), and I'm looking forward to using MySQL, which, I hear, and have seen to some degree, is very convienient/powerful.
Thanks again.
- SSX-Thunderbird
- DBB Admiral
- Posts: 1275
- Joined: Sun Jun 03, 2001 2:01 am
- Location: Washington (the state, not the city)
Re: Good SQL Statement Reference?
www.google.comSergeant Thorne wrote:My question is, are there any good SQL Statement syntax reference resources online? Thanks a lot!
And, as the others have pointed out, MySQL is a much better solution than Access.