JAKARTAPROJECT
JAKARTA TIPJSP TIPJSP Áú¹®&´äº¯DATABASE TIPJAVASCRIPT TIPWEBHACKING TIP±âŸ TIP
µ¥ÀÌÅͺ£À̽º ÆÁ
µ¥ÀÌÅͺ£À̽º ÆÁ
µ¥ÀÌÅͺ£À̽º ÆÁ °Ô½ÃÆÇ ÀÔ´Ï´Ù
Displaying Native SQL
kaiser
À̹ÌÁö ½½¶óÀÌ´õ º¸±â
Displaying Native SQL
Java Database Connectivity (JDBC) drivers sometimes perform conversions on Structured Query Language (SQL) statements that you execute before sending them to the database. It can be helpful for debugging purposes to see the translated SQL, and you can accomplish this by using the nativeSQL() method in the java.sql.Connection class:
Áï, ÀÌ·¸°Ô »ç¿ëÇϸé sql µð¹ö±×ÇÒ¶§´Â ÆíÇϰڳ׿ä ...ÂÁ.
 
java.sql.Connection conn;
.
.
.
java.util.Date curdate = new java.util.Date();
java.text.SimpleDateFormat sdf =
		new java.text.SimpleDateFormat(
		"yy-MM-dd hh:mm:ss");
String datetext = "{ts " + sdf.format(curdate) + "}";
System.out.println(conn.nativeSQL(
		"UPDATE MYTABLE SET DATECOL = " +
datetext));
Running this code will display the converted SQL that the JDBC driver will be sending to the database, such as:
 
UPDATE MYTABLE SET SOMEDATE = TO_DATE (99-04-21 09:23:48, 'YYYY-MM-DD HH24:MI:SS')
Ãß°¡·Î api ã¾Æº¸¸é

nativeSQL

String nativeSQL(String sql)
                 throws SQLException
Converts the given SQL statement into the system's native SQL grammar. A driver may convert the JDBC SQL grammar into its system's native SQL grammar prior to sending it. This method returns the native form of the statement that the driver would have sent.

Parameters:
sql - an SQL statement that may contain one or more '?' parameter placeholders
Returns:
the native form of this statement
Throws:
SQLException - if a database access error occurs
ÀÌ·¸°Ô ³ª¿Í ÀÖ³×¿ä ±×·³ PreparedStatement ¹®ÀåÀÇ ? µµ ³ªÅ¸³¯¼ö ÀÖÀ»·Á³ª
ÂÁ...Å×½ºÆ® ÇÔ ÇغÁ¾ß °Ú³×¿ä 
2005-04-21 00:56:13
222.237.198.***

¼­Çö»ç¶û~ ¾È³ç ¾È³ç ³ªÀÇ ¾Æ±âº°~~

0Á¡ (0¸í)
µ¡±Û 1°³ | ÅÂ±× 0°³ | °ü·Ã±Ûº¸±â
ű×ÀÔ·Â
½±Ç¥(,)±¸ºÐÀ¸·Î Çѹø¿¡ ¿©·¯ ű׸¦ ÀÔ·ÂÇÒ¼ö ÀÖ½À´Ï´Ù
kaiser
(0) (0)
? ´Â ¾ÈµÇ³×¿ä...ÂÁ.... :1 ÀÌ·¸°Ô ³ª¿À³×¿ä
211.189.124.*** 2005-04-21 16:44:40
À̸§ ºñ¹Ð¹øÈ£
µ¥ÀÌÅͺ£À̽º ÆÁ
µ¥ÀÌÅͺ£À̽º ÆÁ °Ô½ÃÆÇ ÀÔ´Ï´Ù
! ¹øÈ£ Á¦¸ñ ±Û¾´ÀÌ ÀÏÀÚ Á¶È¸
181 import DB ºÎºÐÀûÀÎ µ¥ÀÌÅÍ export / import ¹æ¹ý 2 kaiser 2008-12-29 7,795
180 NOT IN NOT EXISTS not in °ú not existsÀÇ °³³ä ÀÌÇØ 1 kaiser 2008-12-17 19,574
179 IP Á¢¼ÓÀÚ ¾ÆÀÌÇÇ º¸±â 1 GoodBug 2008-06-27 9,451
178 meta ¿À¶óŬ ½ºÅ°¸¶ ½ºÅ©¸³Æ® ¹Þ±â 1 GoodBug 2008-06-05 19,843
177 ORA-00054 ORA-00054: resource busy and acquire with NOWAIT specified 1 GoodBug 2007-10-27 13,058
176 ÇÑ±Û MYSQL ¼­¹ö ij¸¯¼ÂÀÌ EUCKRÀÌ ¾Æ´Ò°æ¿ì Ŭ¶óÀ̾ðÆ® ¼³Á¤ 1 GoodBug 2007-10-09 8,344
175 archive ¾ÆÄ«ÀÌºê ¼º´É Çâ»ó 1 GoodBug 2007-10-02 7,939
174 Dictionary Dict table 1 GoodBug 2007-10-02 7,224
173 ¿À¶óŬƩ´× redo log file ±¸¼º ¸ð´ÏÅÍ 1 GoodBug 2007-09-20 7,905
172 dictionary ÀÚÁÖ¾²´Â µñ¼Å³Ê¸® Á¤º¸ 1 1 GoodBug 2007-09-20 8,352
171 TableSpace Tablespace º° »ç¿ë·® È®ÀÎ 1 GoodBug 2007-09-20 8,766
170 ¿À¶óŬ üũÆ÷ÀÎÆ® °ü·Ã ÆĶó¹ÌÅÍ 2 GoodBug 2007-09-20 7,420
169 ¿À¶óŬƩ´× Å×ÀÌºí ½ºÄµ Åë°è 1 GoodBug 2007-09-19 7,265
168 ¿À¶óŬƩ´× v$filestat·Î µð½ºÅ© I/O ¸¦ È®ÀÎÇغ¸ÀÚ 1 GoodBug 2007-09-19 10,248
167 ¿À¶óŬƩ´× ORA-04031 ¿¡·¯ ´ëó¹ý ¹× ¿¹¹æ¹ý 1 GoodBug 2007-09-17 13,717
166 ¿À¶óŬƩ´× DB_FILE_MULTIBLOCK_READ_COUNT 1 GoodBug 2007-09-17 7,272
165 TableSpace TableSpace °ü¸® (Dictionary, Locally) 1 GoodBug 2007-09-16 7,774
164 ¿À¶óŬƩ´× ¹®Á¦ÇØ°á ¹× Æ©´× °ü·Ã ºä 2 GoodBug 2007-09-16 7,698
163 segment ¿À¶óŬ SEGMENT 1 GoodBug 2007-09-16 8,628
162 startup ¿À¶óŬ startup½Ã ´Ü°èº° ¿ÀÇ ÆÄÀÏ 1 GoodBug 2007-09-16 7,531
copyright 2005-2024 by Unicorn