Multiple SQL inserts: Oracle, Mysql, Mssql
I’ve found a useful technique for inserting multiple rows into Oracle, MYSQL and MS SQL databases. Using these examples will help increase the speed and help avoid database timeouts.
I’ve found a useful technique for inserting multiple rows into Oracle, MYSQL and MS SQL databases. Using these examples will help increase the speed and help avoid database timeouts.
jOra is an Eclipse-Plugin for Oracle Developers and Oracle Admins. The plugin makes the work with Oracle easier and more efficient. It eases the daily use of the database.
jOra integrates seamless in the Eclipse Workbench and is therefore best suited for Coldfusion/Java developers using an Oracle database.
jOra is Freeware. It can be used for free [...]
Something I needed today… I wish this was standarized, but it is not, so here are some examples:
SQL Server:
SELECT TOP 10 product, descr, email
FROM products
ORACLE:
SELECT product, descr, email
FROM products
WHERE ROWNUM
Sometimes I’ve had the need to use SQL to go and get table information i.e is a field varchar or int etc.
For MS SQL server you can use the following to get info on a table
SELECT RIGHT(syscolumns.name, LEN(syscolumns.name)) AS dbFieldName, systypes.name AS typename, syscolumns.length AS maxlength, syscolumns.xprec AS [precision], syscolumns.xscale AS scale, syscolumns.isnullable AS isnullable
FROM [...]
You learn something new everyday! I Just discovered that in Coldfusion 7 you can get query infomation (metadata) by adding result = ‘aVariable’ to the cfquery tag.
for example:
select * from aTable
The resulting dump shows:
CACHED (boolean)
COLUMNLIST (the names of the columns returned)
EXECUTIONTIME (time to execute query ms)
RECORDCOUNT (rows returned)
SQL (the sql that was executed)
I use it [...]
Recent Comments