GreenDao executes SQL statements and greendaosql statements

Source: Internet
Author: User

GreenDao executes SQL statements and greendaosql statements

The method http://greendao-orm.com/documentation/queries/ provided in the document can not meet the needs, has limitations, the use of the following statements to operate is very flexible

String SQL = "select * from" + xxxDao;

Cursor c = session. getDatabase (). rawQuery (SQL, null );


How to execute SQL statements

After installing SQL 2000

Start-> All Programs-> Microsoft SQL Server-> query analyzer enter the corresponding database name (if you forget to enter start-> All Programs-> Microsoft SQL Server-> Server management view)) the user name and password can be used to compile and execute the SQL language.

How to automatically execute an SQL statement

Oracle:

1. Add a new batch file, such as a. bat.
2. Add an SQL script file, such as a. SQL
3. In a. bat, enter the sqlplus user name/password @ C: \ a. SQL (assume that a. SQL is in the c: root directory)
4. Run this batch to execute this SQL script.
Assume that the content of a. SQL is exec autojob; select * from scott. emp; select * from scott. dept;
Then you can execute the statement by statement.

SQL Server:

Isql-U username-P password-I c: \ a. SQL

Similarly, in the bat file, enter the above line and enter the script in a. SQL.
For example:
Use Database Name
Go
Select * from Table Name
Go

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.