<?xml version="1.0" encoding="UTF-8" ?>
<jsp:root
	xmlns:jsp="http://java.sun.com/JSP/Page"
	xmlns:og="hybs-taglib.tld" 
	version="2.0">
<jsp:directive.page language="java" contentType="text/html; charset=UTF-8" />

<og:head headType="result" />
<jsp:directive.include file="/jsp/custom/result_info.jsp" />
<og:comment
	system   = "GE:エンジンサンプル"
	pgid     = "GE1004"
	title    = "DB検索"
	date     = "2007/12/12"
	author   = "K.HASEGAWA"
	text     = "ZZZZ"
	version  = "001"
/>

<!-- ユニークインデックスの削除は、テーブルに対して行う。 -->
<og:equals val1="{@TYPE}" val2="INDEX" >
	<og:value command="SQL" dbid="{@DBID}">
	  <jsp:text>
		select (CASE UNIQUENESS WHEN 'UNIQUE'
					THEN 'ALTER TABLE {@OWNER}.' || TABLE_NAME || ' DROP CONSTRAINT {@NAME}'
					ELSE 'DROP {@TYPE} {@OWNER}.{@NAME}'
				END) AS QUERY
		from DBA_INDEXES
		where OWNER      = '{@OWNER}'
		and   INDEX_NAME = '{@NAME}'
		and   rownum     = 1
	  </jsp:text>
	</og:value>
</og:equals>

<og:equals val1="{@TYPE}" val2="INDEX" notEquals="true">
	<og:value command="SET" key="QUERY">
		DROP {@TYPE} {@OWNER}.{@NAME}
	</og:value>
</og:equals>

<og:text>{@QUERY}</og:text>
<br />
<og:query command="{@command}" debug="{@debug}" dbid="{@DBID}" >
	<jsp:text>{@QUERY}</jsp:text>
</og:query>

<jsp:directive.include file="/jsp/common/htmlend.jsp" />
</jsp:root>
