SQL Query Examples
PreviousNext

Content

Driver SQL Syntax

On this page you will find various query examples for Jdbc ODBC Driver / Data Gateway Connector.

Jdbc Query Language Reference

Jdbc driver offers executing query on server side using native SQL. Click on the below link to learn more about Jdbc Query Syntax.
Native SQL Help Page: [Refer to your JDBC Driver Help file to learn about SQL Syntax]

SQL Examples

DML - SELECT Example

This example shows how to write select query.
SELECT * FROM MyTable

DML - UPDATE Example

This example shows how to use UPDATE one or more records in JDBC table. You can supply any valid SOQL compatible WHERE clause.
UPDATE account SET name='New Company Name', BillingState='GA' WHERE id IN ('0014N00001hTNEEQA4')

DML - INSERT Example

This example shows how to create a new record in JDBC table.
INSERT INTO Account(Name, BillingCity,PK__c)
VALUES ('mycompany name', 'New York','K100')

DML - DELETE Example

This example shows how to delete one or more records in JDBC table. You can supply any valid SOQL compatible WHERE clause.
DELETE FROM account WHERE id IN ('0014N00001hTNEEQA4')

Output-On Flag

This example shows how to invoke statements which has multiple statements and produces result. If you are calling multiple statements then for some JDBC drivers you have to set this else it will not produce output or might throw error.
#Output-On CREATE TABLE MyTable(Id int); INSERT INTO MyTable(Id) Values(1); SELECT * From MyTable;

Output-Off Flag

This example shows how to invoke statements which doesn't produce result. For some JDBC drivers you have to set this else it will produce error.
#Output-Off CREATE TABLE MyTable(Id int)


Copyrights reserved. ZappySys LLC.