Thinking caused by error ora-911

Source: Internet
Author: User

The most recent project was using an Oracle database, and the day before yesterday when invoking its own SQL statement, the console appeared with the error shown in the problem (in fact, the SQL statement ended with more semicolons).

For this mistake, people who have used Oralce will know this error, and I think everyone has experienced this error when they first started using oralce (of course, some geniuses except 650) this.width=650; "src="/HTTP/ Img.baidu.com/hi/jx2/j_0013.gif "alt=" J_0013.gif "/>). In fact, this is a habit problem, said the larger point, is the seat of a programmer when the work, there is no set of coding specifications. Look at the demo below:

StringBuffer sql = new StringBuffer, Sql.append ("SELECT * from T"). Append ("Where id ="). Append (ID);

Do you see any problem with the code above? Yes, the above code is OK, but the program will error when running, accurate SQL statement errors. This is the usual code is not the norm caused. The correct notation is to leave a space before and after the string when you add it using append.

Summary: To write both the correct and elegant code, to improve their coding level, are in accordance with a set of specifications to do. The simple point is to form your own coding style. (Well, long time no article, feeling 650) this.width=650; "src=" Http://img.baidu.com/hi/jx2/j_0012.gif "alt=" J_0012.gif "/>", so it is, welcome to the groove! )

This article from "Fox Jackal Xiao Xiao" blog, please be sure to keep this source http://yuqian2203.blog.51cto.com/2828302/1698316

Thinking caused by error ora-911

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.