In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
In EXEC SQL, if the "/ /" symbol appears in the SQL statement, it causes the SQL statement from the end of ";" to be ignored, not just the current line. This often comes as a surprise to programmers.
For example, the following example program t1.ec.
Int main ()
{
EXEC SQL UPDATE vyktd
SET kahaoo= "1" / / comment 1 appears in SQL
WHERE kahaoo= "2"
/ / Note 2 appears in ordinary programs
Return 0
}
Normal compilation can be done by:
$esql-e t1.ec
$
In fact, the SQL executed will be UPDATE vyktd SET kahaoo= "1" without any conditions. Because the WHERE sentence is masked by note 1, it becomes a dangerous full table update!
In order to avoid this hidden trouble, you need to add the compilation parameter of esql-keepccomment, after which, if you write "/ /" in sql, it will compile the error.
$esql-keepccomment-e t1.ec
Esqlc: "t1.ec", line 4: Error-33051: Syntax error on identifier or symbol'/'.
1 error (s) found
$
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.