Oracleããç¡åãã¦ã³ãã¼ãã§ããSQL Developerã¨ãããã¼ã«ãããªã便å©ã ã£ãã®ã§ç´¹ä»ãã¦ã¿ãããªããã®ã¨ã³ããªã§ä½¿ç¨ããOracle SQL Developerã®ãã¼ã¸ã§ã³ã¯3.0ã§ãâ¦â¦ããã¡ããã¡ãã追è¨ãã¦ããããã3.0or4.0以éã®ãã¼ã¸ã§ã³ãåºã«æ¸ããã¦ããé¨åãããã¾ãã
å°å ¥
SQL Developerã¯è¦JDKã
JDKãå
¥ãã¦ãªããã°ãJDKå梱çï¼ãã®zipãã¡ã¤ã«ã«ã¯JDK1.6.0_11ãå«ã¾ãã¦ãã¾ãï¼ã®æ¹ãé¸ã¹ã°OKã
JDKããã¼ã«ã«ãã·ã³ã«å
¥ãã¦ããã° Oracle SQL Developer ダウンロード ãããã¡ã¤ã«ããã¦ã³ãã¼ããã¦è§£åãsqldeveloper.exeãå®è¡ããã ããã³ãã©ã¯èµ·åæã«JDKã®ãã¹ãæ±ããããã®ã§ããããå
¥ãããã¡ãªã¿ã«ãJDK 1.6.0_11以éã使ãã¹ããã¨æ¸ãã¦ããã®ã§ããã以åã®ãã¼ã¸ã§ã³ã§åããã©ããã¯ç¥ããªãã
4.0ã«ã¤ãã¦
- Oracle SQL Developer 4.0のインストールとややハマッた時のメモ - kagamihogeの日記 4.0ããã¯1.7以ä¸ã¨ãªã£ããã¨ã¨ãJDKå梱çã¯ç¡ããªã£ããã¨ä»¥å¤ã¯å¤ããç¡ãã¨æãããã
- Oracle SQL Developer 4.0 EA3のインストールにハマッた - kagamihogeの日記 ãã®ä»ã®ãããã©ããã
- 4.1ããJDK 8以ä¸ãå¿ é ãSQL Developer 4.1 New Features
æ¥ç¶
ä½ã¯ã¨ãããOracleã«æ¥ç¶ããªãã¨ä½ãã§ããªãã®ã§ããæ¥ç¶ããå³ã¯ãªãã¯ãã¦ãæ¥ç¶ã®ä½æããé¸ã¶ã¨ãã®ç»é¢ãåºã¦ããã
ãã®æç¹ãããã¦ããªã便å©ãªãã ããæ¥ç¶ã¿ã¤ããè²ã ããã¶ãã¨ãã§ãããããªãã¿ã®SIDæå®ãããTNSã®ãããã¯ã¼ã¯å¥åã¯å½ç¶ã¨ãã¦ãã¾ããæ¥ç¶ã¿ã¤ãã«æ¡å¼µãé¸ã¶ã¨ã«ã¹ã¿ã JDBC URLã§æ¥ç¶ãã§ãããJavaå±ããçã«ã¯å°å³ã«ããããããæ¥ç¶ã¿ã¤ãã«ã¤ãã¦âSQL DeveloperのOracle接続について調べたこと - kagamihogeの日記
ã¡ãªã¿ã«Oracle XEã®JDBC URLã¯ããã¼ã«ã«ã®ãã·ã³ã«Oracleã¤ã³ã¹ãã¼ã«ããå ´åã¯âãªæãã
jdbc:oracle:thin:@localhost:1521:XE
ãªãsysã§å ¥ãããå ´åã¯ã¦ã¼ã¶ã¼åãä¸è¨ã«ããã°ãããã¾ãã¯ããã¼ã«ãã®ã³ã³ãããã¯ã¹ãSYSDBAã«ãã¦æ¥ç¶ããã
sys as sysdba
åºæ¬ç»é¢
æ¥ç¶ããã¨ãã¨ãããããããªæããå·¦å´ã«ã¨ã¯ã¹ããã¼ã©ãå³å´ã«ã¿ãã¨ããããæ§æã
ã¯ã¨ãªã®ä½æã¨å®è¡
ãã©ãã°ï¼ããããã§SQLãã¤ããããAccessã¨ãã§ã¯ããªãã¿ãªã¢ã¬ã
SQLã®ãã¼è£å®ãSEL..ã¨ãã¾ã§æã¤ã¨åè£ã«ãSELECT * FROMããåºãã¦ããããããã¼ãã«åã»ååãéä¸ã¾ã§æã¦ã°è£å®ãã¦ããããã¾ããEclipseã©ã¤ã¯ã«CTRL+Spaceãæã¦ã°è£å®åè£ãåºã¦ããã®ããããããã
ã¨ãã£ã¿å ã«è¤æ°åã®SQLãæ¸ããã¦ãå ´åãF5ãæ¼ãã°å ¨é¨å®è¡ãã¦ããããã¾ããããããã®ã¯ã¨ãªããã£ããã¤èµ°ããããå ´åã¯ãã«ã¼ã½ã«ããã®ã¯ã¨ãªè¡ã«æã£ã¦ãã£ã¦Ctrl+Enterããã
å¦ççµæãã¿ã¯ãµã³ããå ´åã¯ã50件*1ãã¤ãã§ããããããã¯ã¨ãªçµæã®ãã¥ã¼ã§ã¹ã¯ãã¼ã«ãã¦ããã°ããºã«ãºã«ã¨æ¬¡ã®çµæã表示ããã¦ãããã¯ã¨ãªçµæã®ã³ãã¼ï¼ãã¼ã¹ããå¯è½ãCtrl+Aã§å ¨ä»¶é¸æâã¨ã¯ã»ã«ã«ã³ãããåºæ¥ãããã¼ã¿ã50件以ä¸ã®å ´åãCtrl+Aæ¼ãã段éã§ãã§ãããèµ°ããå ¨ä»¶åå¾ã«ãããã³ããããªããªãCtrl + Endã§è¯ããè¡åä½ã§ã³ãã¼ãããå ´åãè¡çªå·ã表示ããã¦ããã¨ãããã¯ãªãã¯ããã°å¯¾è±¡è¡ãé¸æç¶æ ã«ãªãï¼è¤æ°ä»¶é¸æå¯ï¼ã®ã§ãCtrl+Cããã°ã¯ãªãããã¼ãã«ã³ãã¼ãããã
ã¯ã¨ãªã®å®è¡æ¹æ³ãã®ä»
ã¯ã¼ã¯ã·ã¼ãä¸ã®è¤æ°ã®SQLãä¸åº¦ã«å®è¡ãããå ´åãä¸è¨ã¹ã¯ã·ã§ã®ããã«è¤æ°é¸æç¶æ
ã«ãã¦Ctrl+F5ããã
ã¾ããä¸è¨ã¹ã¯ã·ã§ã®ããã«ããµãã¯ã¨ãªãã¤ã³ã©ã¤ã³ãã¥ã¼ã ããé¸æãã¦Ctrl+F5ãã¦å®è¡ãããã¨ãå¯è½ã
ããã«ãä¸è¨ã¹ã¯ã·ã§ã®ããã«ãã¯ã¨ãªã®ä¸é¨åãé¸æãã¦Ctrl+F5ãã¦å®è¡ãããã¨ãå¯è½ã
SQLã¨ãã£ã¿ã»ã³ã¼ãã»ãã³ãã¬ã¼ã
ãã使ãã¯ã¨ãªãããã¹ããç»é²ãã¦ãããã¨ã§ãå ¥åè£å®åè£ã«ãã®ç»é²ããããã¹ããåºããã¨ãã§ããããã¼ã« -> ããªãã¡ã¬ã³ã¹ -> ãã¼ã¿ãã¼ã¹ -> SQLã¨ãã£ã¿ã»ã³ã¼ãã»ãã³ãã¬ã¼ããããè¨å®ãããä¸è¨ã®ä¾ã§ã¯ãTO_DATE...ãé »ç¹ã«ä½¿ãã¨æ³å®ãã¦ãç»é²ããã¨ãããã¨ãã£ã¿ã§ãTOã¨æã¤ï¼ãCtrl+Spaceãæã¤ï¼ã¨è£å®åè£ã表示ãããã
ã¹ãããã
ãã使ãã³ã¼ããããå ´åã¯ã¹ããããã便å©ã表示 -> ã¹ãããããã§ãã¥ã¼ã表示ããããããããã¨ãã£ã¿ã«ãã©ãã°ï¼ããããããã°ãã³ã¼ããæ¿å
¥ãããã
ã³ã¼ãã»ãã³ãã¬ã¼ãã¨ç°ãªãã®ã¯ãã¹ããããã¯ã³ã¼ãã®æçã«åãããããååã説æãä»ãããããã¾ããèªåç¨ã®ã«ãã´ãªã追å ã§ããã®ã§æ´çãããããããã ããCtrl+Spaceãªã©ã®ãã¼è£å®åè£ã«ã¯åºã¦ããªãã
ãã³ãã¬ã¼ããã¹ããããããè¯ã使ãã¯ã¨ãªã®æçãå¼ã³åºããããããæ©è½ã«ã¯ããããªããã§ãä½ã¿åãã¯èªåã§å·¥å¤«ã®ä½å°ãããã
ãã¼ã«ã«ã®ãã¡ã¤ã«
表示 -> ãã¡ã¤ã«ãã§ãã¡ã¤ã«ã®ããã²ã¼ã¿ã表示ãããããã¼ã«ã«ã«*.sqlãªã©ã§ãã¡ã¤ã«ãä¿åãã¦ãã¦ãããå®è¡ãããå ´åãªã©ã¯ããããå¼ã³åºããã
SQLå±¥æ´
表示 -> SQLå±¥æ´ï¼F8ï¼ã§ãä¸è¨ã®ãã¥ã¼ã表示ããããéå»ãã¡ãã£ã¨åã®ã¯ã¨ãªããã£ããå®è¡ããããã¨ããå ´åã«éå®ãããSQLå±¥æ´ãããæå®ã®ã¯ã¨ãªãã¨ãã£ã¿ã«ãã©ãã°ï¼ããããããããã¯ã¨ãªãããã«ã¯ãªãã¯ããã°ãã¨ãã£ã¿ã«ãã®ã¯ã¨ãªãæ¿å
¥ããããã¾ããå
¥åãã©ã¼ã«ã¹ã®ã¨ããã§ãã£ã«ã¿ãããã¦åè£ãçµãè¾¼ããã
SQLã®ãã¥ã¼ãã³ã°
å®è¡è¨ç»ãè¦ããå ´åãã¿ãã®ä¸é¨ã«ãããå®è¡è¨ç»ãã®ãã¿ã³ã¨ãé©å½ãªã¯ã¨ãªã®ä¸ã§å³ã¯ãªãã¯âå®è¡è¨ç»ï¼F10ï¼ããè¦ããã
èªåãã¬ã¼ã¹ï¼F6ï¼ã¯ãããªæãã
å®è¡è¨ç»ã»èªåãã¬ã¼ã¹ã§è¡¨ç¤ºãããé ç®ã®è¨å®ã¯ãããªãã¡ã¬ã³ã¹ -> ãã¼ã¿ãã¼ã¹ -> èªåãã¬ã¼ã¹/å®è¡è¨ç»ãã§è¡ãããªãããã£ããã£ç»åã®ããã«å¤ã0ã°ããã ã¨é常ã«è¦è¾ãã®ã§ã0åã®çµ±è¨ãã¹ããããã«ãã§ãã¯ãå ¥ããã°å¤§åè¦ããããªãã*2
SQLãã¥ã¼ãã³ã°ã¢ããã¤ã¶ãæ¼ãã¨ãä»ã«ãè²ã
ã¨æ
å ±ãå¾ãããï¼ãããï¼ãOracle DBå´ã«Oracle Tuning Packï¼æåï¼ãã¤ã³ã¹ãã¼ã«ããã¦ããªããã°ãªããªããããªã®ã§è©¦ãäºãã§ãã¦ããªãã
ãã¼ã¿ã®ã¨ã¯ã¹ãã¼ã
ãã¼ãã«ãªãã¯ã¨ãªã®å®è¡çµæãªãããã¡ã¤ã«ã«åãåºãæ©è½ãããããã¨ã¯ã¹ãã¼ãã ãããªãããã¢ã³ãã¼ããã¨ããç°æ§ã«ãããã«ããååã«ãªã£ã¦ãããè±åèªçã«ã¯unloadã§ãã£ã¦ãã®ããããããã©ãã«ã¿ã«ãã ã¨ãªãããããéåæãâ¦â¦*3
ã¯ã¨ãªã®å®è¡çµæã®ã¨ããã§å³ã¯ãªãã¯âã¢ã³ãã¼ããã¨ã¯ã¹ããã¼ã©ãããã¼ãã«ãé¸ãã§å³ã¯ãªãã¯âã¢ã³ãã¼ãããã©ã¼ãããã¯CSV,TXTã ãã§ãªãXLSãé¸ã¹ããå¥ãã¼ãã«ã«å¯¾ããè¤æ°ã®INSERTæã¨ãã¦ãåãåºããã
ãã¼ã¿ã®ã¤ã³ãã¼ã
SQL Developerからテーブルにデータを入れる - kagamihogeの日記 ãã¼ãã«ã¸ã®è¿½å ã»ç·¨éã»åé¤ã¨ã¤ã³ãã¼ãã«ã¤ãã¦ã¯ã³ãã©ã
SQL Developerのインポート機能でken_all.csvを読み込んでみる - kagamihogeの日記 ãåèã«ãªãããããã¾ããã
CREATE TABLEã®GUI
SQL Developerの表作成機能についてのメモ - kagamihogeの日記 ãã¼ãã«ã®ä½æã«ã¤ãã¦ã¯ã³ãã©ã
ãã¡ã³ã¯ã·ã§ã³
ãã¡ã³ã¯ã·ã§ã³ã®å®è¡
CALLããFUNCTIONããã§å¼ã³åºããªãã¨ãããªãã£ãããã¦ãPL/SQLã«æ £ãã¦ããªãã¨ããã®ãããã¯ä½ãã¨ããã©ãããããã®å ´åãã¨ã¯ã¹ããã¼ã©ããå®è¡ããããã¡ã³ã¯ã·ã§ã³ãå³ã¯ãªãã¯âå®è¡ï¼Ctrl+F10ï¼ããã¨ãä¸è¨ã®ãã¤ã¢ãã°ãåºã¦ãã¦PL/SQLãããã¯ã®ãã³ãã¬ã¼ãã表示ãã¦ãããã®ã§ããããé©å½ã«ç·¨éãã¦å®è¡ããã°ããã
ãããã°å®è¡
EclipseçIDEã使ã£ããã¨ãããã°ã馴æã¿ã®æ©è½ãä¸è¨ã®å³ã§ã¯7è¡ç®ã«èµ¤ã丸å°ãä»ãã¦ããããããããã¬ã¼ã¯ãã¤ã³ãã§ããã®ä¸¸å°ã®å ´æããã¦ã¹ã§ã¯ãªãã¯ããã°ãã¬ã¼ã¯ãã¤ã³ãã®è¨ç½®ã»è§£é¤ï¼F5ï¼ãã§ããããã®ãã¨ã天éè«ã¢ã¤ã³ã³ã®ãããã°å®è¡ï¼Ctrl+Shift+F10ï¼ããã¨ããã®è¡ã§ä¸æåæ¢ããããã¨ã¯ãä¸è¡ãã¤é²ãããå ´åã¯ã¹ãããå®è¡ï¼F8ï¼ããããåéï¼F9ï¼ããããããã
ãã©ãã·ã¥ããã¯
SCNã確èªã§ããç¨åº¦ã ãã©ä¸ä¸ã®æã«ã¯ç¥ã£ã¦ããã¨ä¾¿å©ããã
åèï¼Oracle Flashback QueryをSQL Developerでつかう - kagamihogeの日記
Oracle以å¤ã®ãã¼ã¿ãã¼ã¹ã¸ã®æ¥ç¶
Oracle以å¤ã®DBã¸ãæ¥ç¶ã§ããã
MySQL
ãã¼ã« -> ããªãã¡ã¬ã³ã¹ -> ãµã¼ãã»ãã¼ãã£JDBCãã©ã¤ããã®ãã¨ã³ããªè¿½å ã§å¥éãã¦ã³ãã¼ãããJDBCãã©ã¤ãã®jarã®ãã¹ãæå®ããããã®ãã¨ãæ¥ç¶ã®ä½æãéãã¨ä¸è¨ã®ããã«MySQLã®ã¿ããå¢ãã¦ãããã¦ã¼ã¶åããã¹ã¯ã¼ãããã¹ãåããã¼ããå ¥ãã¦ããã¼ã¿ãã¼ã¹ã®é¸æãã¿ã³ãæ¼ãã¨ãã®å³ã®ãã«ãã¦ã³ã¡ãã¥ã¼ã«ä¸è¦§ã表示ããããããã§SQL DeveloperããMySQLã«æ¥ç¶ã§ããã
MySQL 5ã§æ¥ç¶ç¢ºèªã
MySQL 5.xã®å ´åãmysql-connector-java-5.0.4-bin.jarãå¿ è¦ã§ããããã¯ãmysql-connector-java-5.0.4.zipã«å«ã¾ãã¦ãã¾ããããã«ããâãæ´æ°ã®ãã§ãã¯ãçµç±ã§ãå ¥æã§ãã¾ãã(ææ°ã®MySQLãã©ã¤ã5.1ã¯ä½¿ç¨ããªãã§ãã ããã)
Oracle SQL Developerのインストール 1.6 SQL Developerã«å¯¾ãããã¼ã¿ãã¼ã¹ã®åä½ä¿è¨¼(Oracleããã³ãµã¼ãã»ãã¼ãã£)ãããæç²
ã¨ãæ¸ãã¦ããï¼2012/01/17æç¹ï¼ã®ã注æç¹ã
SQL Server
ãã«ã -> æ´æ°ã®ç¢ºèªããThird Party SQL Developer Extensionsãé¸æãã¦æ¬¡ã®ç»é¢ã§JTDS JDBC Driver ãé¸ãã§ã¤ã³ã¹ãã¼ã«ã
ãã®ãã¨ãæ¥ç¶ã®ä½æãéãã¨ä¸è¨ã®ããã«SQL Serverã®ã¿ããå¢ãã¦ããã®ã§ãé
ç®ã«é©åãªå¤ãå
¥åããã°SQL Serverã«æ¥ç¶ã§ããã
SQL Server 2005 Express Editionã§æ¥ç¶ç¢ºèªãã§ãããèãããåã«GUIã®ã¤ã³ã¿ãã§ã¼ã¹ã欲ããã ããªãSQL Serverã¯Microsoft SQL Server Management Studio使ãã°ããã§ãããã
Sybase - Adaptive Server Enterprise
SQL Serverã®é
ã§æ¸ããJTDS JDBC Driverã®ã¤ã³ã¹ãã¼ã«ãçµããã°æºåOKã
Adaptive Server Enterprise 15.7 Developer's Editionã§æ¥ç¶ç¢ºèªããªããã³ã¬ãwindowsä¸ã§é©å½ã«ããã©ã§ã¤ã³ã¹ãã¼ã«ããã¨ãã¦ã¼ã¶ã¼åã¯saã§ãã¹ã¯ã¼ãã¯ç©ºã§ãã¹ãåã¯ã³ã³ãã¥ã¼ã¿åï¼ãåæã«å
¥ã£ã¦ãã¨æãï¼ã«ãªã£ã¦ããã
ãªããSQL Anyware 12ã¯æ¥ç¶ã§ããªãããã ããSQL Anyware ã¨ã©ã¼-110 : ã¢ã¤ãã 'jtds000001'ã¯ãã§ã«åå¨ãã¦ãã¾ãããã¨ããã¨ã©ã¼ãçºçãããココ ã«ããã¨ãSQL Developer 3.0ã¯Adaptive Server Enterprise 12,15 ã®ã¿ã®ãµãã¼ãã§SQL Anywhereã¯å¯¾è±¡å¤ãã¨ã®ãã¨ã
DB2
ã¾ãã db2jcc.jarããã³db2jcc_license_cu.jarãé©å½ãªãã£ã¬ã¯ããªã«é ç½®ããã
ãã®ãã¨ããã¼ã« -> ããªãã¡ã¬ã³ã¹ -> ãã¼ã¿ãã¼ã¹ -> ãµã¼ãã»ãã¼ãã£JDBCãã©ã¤ãã§ã¨ã³ããªã®è¿½å ã§å
ã®2ã¤ã®jarãã¡ã¤ã«ãé¸æããããã®ãã¨ãæ¥ç¶ãéãã¨ä¸è¨ã®ããã«DB2ã®ã¿ããå¢ãã¦ããããã¨ã¯é©åãªå¤ãå
¥åããã°DB2ã«æ¥ç¶ã§ããã
DB2 Express-C v10.1.0.0ã§æ¥ç¶ç¢ºèªã
Access
ä»»æã®æ¥ç¶åã¨mdbãã¡ã¤ã«ã®ãã¹ãå
¥åããã°ãç¹ã«äºåæºåç¡ãã«æ¥ç¶ã§ããã
Microsoft Access 2000ã§ä½æããmdbãã¡ã¤ã«ã§æ¥ç¶ç¢ºèªã
PostgreSQL
俺ã試ãã¦ã¿ãç¯å²å ã§ã¯ãã¤ãªããªãã£ã½ãããµã¼ããã¼ãã£JDBCãã©ã¤ãã«è¿½å ãã¦ããã°ãããããªããã¨æã£ããã©ãæ¥ç¶ã¿ãã«PostgreSQLãåºã¦æ¥ãªããOracle SQL Developerのインストール ã®ã1.6 SQL Developerã«å¯¾ãããã¼ã¿ãã¼ã¹ã®åä½ä¿è¨¼(Oracleããã³ãµã¼ãã»ãã¼ãã£)ããè¦ãã¨ããµãã¼ãããDBã¯ãDB2, Access, SQL Server, MySQL, Sybase, Teradataã¨ããã®ã§ãå ¬å¼æ å ±çã«ã¯PostgreSQLã¯ç¹ããªããã®ã®ããã ï¼2012/01/17ï¼
ã¡ãªã¿ã«ãå人çã«ã¯PostgresSQLã«æ¥ç¶å¯è½ãªA5:SQL Mk-2 - フリーの汎用SQL開発ツール/ER図ツールã軽éãªãã¼ã¿ãã¼ã¹ã¯ã©ã¤ã¢ã³ãã¨ãã¦æ°ã«å ¥ã£ã¦ããã
移è¡æ©è½
ãããããã¼ã¿ãã¼ã¹ã»ãã¤ã°ã¬ã¼ã·ã§ã³ãASEã®ãµã³ãã«DBãOracleã«ç§»è¡ããã£ã¦ã¿ãã¨ã³ããªã¯ã³ãã©âOracle SQL Developerのマイグレーション機能を使ってみる - kagamihogeの日記
ãã®ä»
ã¡ãã£ã¨ããTipsçãªãã®ã
æ¥ä»ãã¿ã¤ã ã¹ã¿ã³ãåã®æ¸å¼è¨å®
ããã©ã«ãã ã¨ã11-11-01ã¿ããã«è¡¨ç¤ºããããã§ãããã2011/11/01ã¿ããã«æ¸å¼ãå¤ãããå ´åãä¸è¨ã®è¨å®é ç®ãå¤æ´ããããã¼ã« > ããªãã¡ã¬ã³ã¹ > ãã¼ã¿ãã¼ã¹ > NLS ã§ã辿ããã
æ¥ä»æ¸å¼ RR-MM-DD ã¿ã¤ã ã¹ã¿ã³ãæ¸å¼ RR-MM-DD HH24:MI:SSXFF ã¿ã¤ã ã¹ã¿ã³ãTZæ¸å¼ RR-MM-DD HH24:MI:SSXFF TZR
ã¨ãªã£ã¦ãã®ããä¾ãã°ä¸è¨ã®ããã«ããã
æ¥ä»æ¸å¼ YYYY/MM/DD ã¿ã¤ã ã¹ã¿ã³ãæ¸å¼ YYYY/MM/DD HH24:MI:SS ã¿ã¤ã ã¹ã¿ã³ãTZæ¸å¼ YYYY/MM/DD HH24:MI:SSXFF TZR
SQLã¨ãã£ã¿ã®å ¥åè£å®ã大æåã«ããã
Oracleã«çºè¡ããã¯ã¨ãªã¯å
¨é¨å¤§æåã«ããããããã¨ããå ´åã®è¨å®ãããªãã¡ã¬ã³ã¹ -> ã³ã¼ãã»ã¨ãã£ã¿ -> æ§æè£å®ã¤ã³ãµã¤ãã®ãå
¥åæã«å¤§/å°æåãå¤æ´ããUpper Caseã«ããã
SQLã¯ã¼ã¯ã·ã¼ãä¸ã®ã大æå/å°æå/INITCAP Ctrl+å¼ç¨ç¬¦ããã¿ã³ã§ãéææ´å½¢ãã§ãããæ´å½¢ããSQLãé¸æç¶æ
ã«ãã¦ããã¿ã³ãæ¼ãã¨å¥ã®ã«ã¼ã«ã§æ´å½¢ããããã
ãã¿ã³ãä¸åãã¤æ¼ãã¦ãã£ãã¨ããã©ã®ãããªå¤åããããã®ãµã³ãã«ãä¸è¨ã
SELECT TABLE_NAME, STATUS FROM USER_TABLES WHERE TABLE_NAME = 'HOGE';--Upper Case select table_name, status from user_tables where table_name = 'HOGE';--Lower Case SELECT table_name, status FROM user_tables WHERE table_name = 'HOGE';--Upper Keywords select TABLE_NAME, STATUS from USER_TABLES where TABLE_NAME = 'HOGE';--Lower Keywords, Upper Identifiers Select Table_Name, Status From User_Tables Where Table_Name = 'HOGE';--Initial Cap
å人çã«ã¯Upper Keywords, Lower Caseã欲ããã®ã ãããªãã¡ã¬ã³ã¹ã«ã¯ç¡ãããã ãããã®ãã¿ã³ãé ç¹°ãã«æ¼ãã°çµæçã«ããã«ãªãï¼Lower Caseçµç±Upper Keywordsï¼ã®ã§ãããã°ã«SQLãè¼ããå ´åã¯ãã®ãã¿ã³ã§æ´å½¢ããã¦ãã¾ãã
å®è¡çµæãå¥ã¿ãã§éããã
ä¸å³ã®ããã«ãããã¯ã¨ãªã®å®è¡çµæã®ã¿ãã¯ãã®ã¾ã¾ã§ãå¥ã®ã¯ã¨ãªãå®è¡ããããã®çµæã¯å¥ã®ã¿ãã§éãããããªã©ã®å ´åãå®è¡çµæã¿ãã®å·¦ä¸ã«ãããã³ã®ã¢ã¤ã³ã³ãã¯ãªãã¯ããã¨ããã®ã¿ãã¯ãã³çãããããå¦ãåºå®ãããããã¨ãã¿ãå³ã¯ãªã㯠-> ååå¤æ´ã§ãã¿ãã®ååããããªãã®ã«å¤ããããã
å®è¡çµæã®ãã§ãã件æ°ãå¤ããã
ããã©ã«ãã§ã¯50件ãã¤ãã§ãããããããã®ãµã¤ãºãå¤ãããå ´åãããªãã¡ã¬ã³ã¹ -> ãã¼ã¿ãã¼ã¹ -> æ¡å¼µ ã®ãSQLé åãã§ããã»ãµã¤ãºããå¤æ´ããããªãï¼æ大500ï¼ã¨ãã注ææ¸ããããã500ãã大ããæ°å¤ã¯è¨å®åºæ¥ãªãããã ã大ãããã¼ãã«ãã¦ãã«ãªã¨å ¨ä»¶åå¾ãã¦ãã¾ãã®ãå°ããã®ã ã¨ãããã¨ã ããã
ã¹ã¯ãªããã®åºåã®ä»¶æ°ãå¤ããã
æã®å®è¡ï¼Ctrl + Enterï¼ã§ã¯ãªããã¹ã¯ãªããã®å®è¡ï¼F5ï¼ãå®è¡ããã¨ãã¹ã¯ãªããã®åºåãã¿ãã«ããã¹ãå½¢å¼ã§åºåãããããã®æ©è½ã¯ãããã©ã«ãã§ã¯5000è¡ã¾ã§ããå®è¡çµæãåºåããªããä¸è¨ã¹ã¯ã·ã§ã§ã¯ã1ä¸è¡å
¥ã£ã¦ãããã¼ãã«ã«å¯¾ãå
¨ä»¶æ¤ç´¢ã¯ã¨ãªãã¹ã¯ãªããã®å®è¡ï¼F5ï¼ããã¨ããããã¹ã¯ãªããçµæã§ã¯5,000è¡ã®ã¿ããµãã¼ãããã¾ããã¨ããã以éã®æ¤ç´¢çµæãçç¥ããã¦ããã
ãã®ä»¶æ°ã®å¤æ´ã¯ããã¼ã« -> ããªãã¡ã¬ã³ã¹ -> ãã¼ã¿ãã¼ã¹ -> ã¯ã¼ã¯ã·ã¼ã ã®ãã¹ã¯ãªããã§å°å·ããæ大è¡æ°ãã§å¯è½ãMAXã¯åãããªãã1000000000ã¨ãå
¥åã§ããã
ãã£ã«ã¿
表ãã¼ã¿ãªã©ãä¸è¦§è¡¨ç¤ºããç»é¢ã«ããããã£ã«ã¿ã«ã¤ãã¦ãç°¡åã«è¨ãã°ããã®ãªãã¸ã§ã¯ãã«å¯¾ãã¦æ¡ä»¶ç¯ãè¨è¿°ãã¦è¡¨ç¤ºãçµãè¾¼ãããã®ãã®ãWHEREã®ãããã£ãããæ¸ãã¦è¡¨ç¤ºãçµãè¾¼ããã¨æãã°åãããããã
ä¸è¨ã®ç»é¢ãã£ããã£ä¾ã¯ãv$parameterãéãã¦ãNAME LIKE 'optimizer%' AND TYPE < 3ãã®æ¡ä»¶ã§ãã£ã«ã¿ãããã¦ã¿ãæ§åã
åãåããçµæãååä½ã§ã³ãã¼ããã
表è¨ç®ã©ã¤ã¯ã«çµæã表示ãããããåã§ã³ãã¼ããããªãã®ã人æ
ã¨ãããã®ã ããRDBã®æ§è³ªä¸ãåæå®ã§ã³ããºããã®ã¯é£ããããã ãã¨ã¯ã¹ãã¼ãã§è¿ãåãã¯åºæ¥ããããæ¹ã¯ãã¾ãã³ãããããåã ã表示ããã¯ã¨ãªãå®è¡ãããã®çµæãã¨ã¯ã¹ãã¼ãããã¨ãããã©ã¼ããããtextã«ãã¦ä¿åå
ãã¯ãªãããã¼ãã«ãããããã§åãã³ããã«è¿ããã¨ã¯åºæ¥ãããã ãExcelã¨ã¯éãã®ã§ä»¶æ°ãå¤ãå ´åã®è² è·ã«ã¯æ³¨æãããã
ããä¸ã¤ã®ããæ¹ãåãåããçµæã®ãã¥ã¼ã®åãããã¼ãã¯ãªãã¯ãããã¨ã§ããã®åã®ã¿å
¨è¡é¸æã§ããã®ã§ããã®ãã¨CTRL + Cã§ã³ãã¼ã§ããããã ããç¾å¨ãã§ãããããè¡ã®ã¿é¸æãããç¹ã«æ³¨æãå¿
è¦ãã¤ã¾ããããã©ã«ãã§ã¯ãã§ãã件æ°ã¯50件ãªã®ã§ãçµæ件æ°ã51件以ä¸ãã£ã¦ã50件ããã³ãã¼ãããªãããã¡ãããåãåããçµæãå
¨ä»¶ãã§ããããã¦ããã°å
¨ä»¶ã³ãã¼ãããã
ãã¼ãã«ã®åååå¾
é©å½ãªSQLãå®è¡ãããã¨ãåãåããçµæã®åãããã¼ãCTRL + ã¯ãªãã¯ã§ååãåå¾ãããåãè¤æ°é¸æããããã®ãã¨ãå³ã¯ãªã㯠-> é¸æãã¦åãããã¼ãã³ãã¼ããããã
ããã¾ã§ãSQLæ¸ããã«ããããå ´åã表ã®ã¨ã¯ã¹ãã¼ããé¸æãããã¨ãä¸è¨ç»åã®ããã«ããããDDLã®ã¨ã¯ã¹ãã¼ããã®ãã§ãã¯ãå¤ããããã¼ã¿ã®ã¨ã¯ã¹ãã¼ããããããã¼ãã«ãã§ãã¯ãå
¥ããããã©ã¼ãããï¼csvã§è¯ãã¨æããã©ï¼ã¨ãçµäºæåã¨ãå²ã¿æåã¨ãã¯ã好ã¿ã§ããå¥åä¿åãã¯ãã¡ã¤ã«ã«ä¿åããã®ãé¢åãªãCtrl+Cããã®ã¨åçãªãã¯ãªãããã¼ããã«ãã¦ããã
ããªãã¸ã§ã¯ãã®WHEREãã«ã1=0ããå
¥ããããã®æ¡ä»¶ã«ãã£ã¦ã表ã®ãã¼ã¿ã¯1件ãã¨ã¯ã¹ãã¼ããããããããã¼è¡ã¤ã¾ãã«ã©ã åã ãã¯ãªãããã¼ãã«åºåãããããã¨ã¯è²¼ãä»ããã ãã
è¤æ°çª
SQLãæ¸ãã¯ã¼ã¯ã·ã¼ããè¤æ°æ¬²ãããªãããã¼ã« -> SQLã¯ã¼ã¯ã·ã¼ããé¸ã¶ã
ä¸ã¤ã®æ¥ç¶è¨å®ããã¯ãä¸ã¤ã®æ¥ç¶ãã確ç«ã§ããªãããã ããã ããä¸èº«ã¯åä¸ã ãç°ãªãæ¥ç¶è¨å®ãä½æãããããã«å¯¾ãã¦æ¥ç¶ã確ç«ããã°ãè¤æ°ã»ãã·ã§ã³ã§è¤æ°çªãåºæ¥ããã¨ã¯ãããè¤æ°çªã®åã ãOracleã®ã»ãã·ã§ã³ã確ç«ãããã¨ã«ãªãã®ã§ãç°å¢ã«ãããããããã¿ãããã¨Oracleã®è³æºã使ãã®ã¯ãããããªãã¨æãããã
3.0ãã3.1ã¸è¨å®ã移è¡ããã
åºæ¬çã«ã¯3.1ããã¦ã³ãã¼ããã¦å®è¡ããã ããOracle SQL Developer 3.0から3.1へ設定のインポート - kagamihogeの日記
SQL DeveloperãåããJavaã®ãã¼ã¸ã§ã³ãå¤ããã
sqldeveloper\bin\sqldeveloper.confã«SetJavaHomeã¨ããè¡ãããã®ã§ããã®å¤ãå¥ãã£ã¬ã¯ããªã«å¤ããã°ããããã ãå½ç¶ã ããµãã¼ãããã¦ããã¼ã¸ã§ã³ãããªãã¨èµ·åããªãã試ãã«1.5ã«å¤ãã¦ã¿ãããJava version 1.5.0_14 not supported. The minimum version required is 1.6.0_04.ã¨ãã¨ã©ã¼ãåºãã
jdk1.7ã§åãï¼
ãã¼ã¸ã§ã³3.1.07.42ã§ã¯ä¸è¨ã®ããã«ãµãã¼ãå¤ã¨ã®è¦åãåºããåããã©ããã¯è©¦ãã¦ããªãã
ãã¼ã¸ã§ã³4.0ã§ã¯1.7以ä¸ã¨ãªã£ããSQL Developer 4.0 Release Notes
ãã¬ã¼ã¹ãã¡ã¤ã«ãéã
trcãã¡ã¤ã«ããã©ãã°ï¼ãã©ããorãã¡ã¤ã«ãéããã¨ãããããã¡ã¤ã«ãè¦ãã¾ãã£ã¦ã ãã§ããããã«TKPROFã»ã©æ¬æ ¼çãªæ´å½¢ã¯ãã¦ãããªãã£ã½ãã
nullã®è¡¨ç¤ºå¤æ´
ããªãã¡ã¬ã³ã¹ -> ãã¼ã¿ãã¼ã¹ -> æ¡å¼µ -> ã次ã®ããã«Nullå¤ã表示ããèæ¯è²ã使ç¨ããNullã®è¡¨ç¤ºããå¤æ´ãããã¨ã§ãnullãèå¥ããããã§ãããä¸è¨ã®ç»åã¯ãããããã####ã¬ã####ããPINKãã¨æå®ããä¾ã
表ãªã©ãªãã¸ã§ã¯ããéãã¨ãã·ã³ã°ã«ã»ã¯ãªãã¯ãããã«ã»ã¯ãªãã¯ã«ãã
ããªãã¡ã¬ã³ã¹ -> ãã¼ã¿ãã¼ã¹ -> ObjectViewer ã®ãã·ã³ã°ã«ã»ã¯ãªãã¯ã§ãªãã¸ã§ã¯ãããªã¼ãã³ãã§åãæ¿ããå¯è½ã
åèã«ããæ å ±æºãªã©
- Oracle SQL Developerの使い方および最新機能ご紹介
- Oracle DBA & Developer Days 2011ã®ã»ãã·ã§ã³è³æã®ä¸ã¤ãã¹ã¯ãªã¼ã³ã·ã§ãããè±å¯ã§ã©ããªæ©è½ããããããããããã
- SQL Developer 3.0が登場!80以上の新機能・機能追加が行われる
- ãªã³ã¯å ã®ãã¢ã³ã¹ãã¬ã¼ã·ã§ã³ã®åç»ãããããããã
- Oracle Database Express Edition 11g Release 2
- ããããããªã¼ã®Oracle DBãä»ã®ã¨ãã£ã·ã§ã³ã«æ¯ã¹ãã°è²ã ã¨å¶éã¯ãããã®ã®ãå人ã®å®é¨ç¨éãªãã³ã¬ã§å åã
- Oracle SQL Developerメモ(Hishidama's Oracle SQL Developer Memo)
ãã¾ã
ããã§ããªã¼ã£ã¦ã©ããããã¨ãªã®â¦â¦ã£ã¦ã¬ãã«ã®ãã¼ã«ãªãã§ãããé£ç¹ãç¡ãããã§ããªããJavaãã¼ã¹ã ãããèµ·åãå²ã¨ã¢ããµãªãã¦ãããã¡ã¢ãªããããªãã«é£ãï¼ãã®è¨äºæ¸ãã®ã«ããã£ã¦ãç¨åº¦ã®ä½¿ç¨ã§200MBãããæ¶è²»ï¼ããªã®ã§ãã¡ããã£ã¨SQL試ãããã ãã®ã¨ãã¯ãsqlplusã¨ãã³ãã³ãã©ã¤ã³ããå©ããªãCSEãªãã®è»½éãã¼ã«ä½¿ã£ãã»ããããã£ã½ãæãã
ã¨ãããã¿ãã§ã³ã¬ã£ã¦ã®ã¯ä¸ã ã«ç´ æ´ãããã§ãã