delphiÖжàÌõ¼þSQLÓï¾äµÄÔö¼Ó×¢ÒâÊÂÏî
ÔÚDELPHIÖг£³£ÒªÓõ½ADOQUERYÖеÄSQLÓï¾äÔö¼ÓÐÅÏ¢ºóÖ´ÐУ¬µ±ÒªÇóÔö¼ÓÌõ¼þ£¨Èç²ÎÊýʱ£©ÖмäµÄ¼ä¸ôºÜÖØÒª£¬¸ã²»ºÃ¾ÍÒª³ö´í£ºÏ¾ÙÀý˵Ã÷ÎÒÒª±í´ïµÄÒâ˼£º
È磺һ¸ö±í:student ÓÐ ksh,xm,xb,lqzy,lqcc¼¸¸ö×ֶΣ¬¶¼Îª×Ö·ûÐÍ¡£ÏÖÒªÇó°´xb·Ö×éͳ¼ÆÈËÊý£¬Í¬Ê±lqccÒªÇóÏÞ¶¨Ìõ¼þ¡£
Ò»°ãÇé¿öϵÄSQLÓï¾äÓ¦¸ÃΪ£º select xb,count(*) from student where lqcc='ÏÞ¶¨Ìõ¼þ';
µ±xbÕâÏîÊǶ¯Ì¬¿ÉÑ¡±äµÄÇé¿öÏ£¨¿ÉÒÔΪlqzyµÈ£©
ÔÚDELPHIÖÐÓï¾äÔö¼ÓÈçÏ£º
ADOQuery1.close;
ADOQuery1.sql.clear;
ADOQuery1.sql.add('select'+#10+combobox1.text+',count(*) from student where lqcc='+#39+combobox2.text+#39+'group by'+#10+combobox3.text);
ADOQuery1.active:=true;
˵Ã÷£º#10 ±íÊÇACSII±àÂëµÄ¿Õ¸ñ£¬#39±íÊÇ’µ¥ÒýºÅ,ÒªÇó³ÉË«³öÏÖ£¬¶ø#10²»Óá£
Ïà¹ØÎĵµ£º
DECLARE
TYPE list IS TABLE OF t_stu.project%TYPE INDEX BY BINARY_INTEGER;
project_list list;
v_pro_num NUMBER;
sql_str VARCHAR(255);
t_stu
SID SUBJECT SCORE
1 Êýѧ &n ......
transaction 1:
------------------------------------------------------
begin transaction
update table1 set cola = 'str1'
Waitfor time '10:12:00'
update table2 set colb = 'str2'
rollback transaction
transaction 2:
---- ......
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE proc pGetInsertSQL (@TableName varchar(256))
as
begin
set nocount on
declare @sqlstr varchar(4000)
declare @sqlstr1 varchar(4000)
declare @sqlstr2 v ......
1.µ½http://www.oracle.com/technology/global/cn/software/tech/oci/instantclient/htdocs/winsoft.htmlÏÂÔØ
11.1.0.7.0 °æµÄ¼´Ê±¿Í»§¶Ë³ÌÐò°ü — Basic£¨²»ÊÇBasic Lite£©
2.½«ÏÂÔص½µÄÎļþ½âѹ£¬½âѹºóÎÒ½«Ä¿Â¼instantclient_11_1ÀïµÄÈ«²¿Îļþ¿½±´µ½ÁËÒ»¸öеÄĿ¼£ºE:\programs\OracleClient¡£ÄãÒ²¿ÉÒÔ²»¿½±´£¬Ö ......
ÎÒÃÇÔÚÊý¾Ý¿âÖÐʹÓñíµÄʱºò,¾³£»áÓöµ½Á½ÖÖʹÓñíµÄ·½·¨,·Ö±ð¾ÍÊÇʹÓÃÁÙʱ±í¼°±í±äÁ¿¡£ÔÚʵ¼ÊʹÓõÄʱºò£¬ÎÒÃÇÈçºÎÁé»îµÄÔÚ´æ´¢¹ý³ÌÖÐÔËÓÃËüÃÇ£¬ËäÈ»ËüÃÇʵÏֵŦÄÜ»ù±¾ÉÏÊÇÒ»ÑùµÄ£¬¿ÉÈçºÎÔÚÒ»¸ö´æ´¢¹ý³ÌÖÐÓÐʱºòȥʹÓÃÁÙʱ±í¶ø²»Ê¹Óñí±äÁ¿£¬ÓÐʱºòȥʹÓñí±äÁ¿¶ø²»Ê¹ÓÃÁÙʱ±íÄØ?
¡¡¡¡ÁÙʱ±í
¡¡¡¡ÁÙʱ±íÓëÓÀ¾Ã± ......