Õâ¸öSQL¾ä×ÓÈçºÎ¸Ä£¿ - MS-SQL Server / ÒÉÄÑÎÊÌâ
string strSqltime = "insert into tblcurrenttime (currenttime,term£¬modifytime)Values('" +comboBox1.SelectedItem+ "','" +comboBox2.SelectedItem+ "','" +DateTime.Now+ "')";
±¨´íѽ£¬'£¬' ¸½½üÓÐÓï·¨´íÎó¡£
strsqltimeֵΪ£ºinsert into tblcurrenttime (currenttime,term£¬modifytime)Values('System.Data.DataRowView','ÏÂѧÆÚ','2010-5-5 0:54:47')
comboBox1ÖеÄÏîÊÇ´ÓÊý¾Ý¿â°ó¶¨ÉÏÈ¥µÄÖµ£¬ÊÇ2009-2010£¬ÀàÐÍÊÇnvarchar(9)µ÷ÊÔ³öÀ´ÊÇ£ºSystem.Data.DataRowView¡£ÈçºÎ°ìѽ£¬ÇëÖî´óʦÃÇ¡£
termºóÃæµÄ¶ººÅÒªÊÇÓ¢ÎÄ״̬ϵİë½Ç¶ººÅ¡£
string strSqltime = "insert into tblcurrenttime (currenttime,term,modifytime)Values('" +comboBox1.SelectedItem+ "','" +comboBox2.SelectedItem+ "','" +DateTime.Now+ "')";
ÕâÊÇÐ޸ĺóµÄ£¬ÄãÊÔÊÔ¡£
string strSqltime = "insert into tblcurrenttime (currenttime,term£¬modifytime)Values('" +comboBox1.SelectedItem+ "','" +comboBox2.SelectedItem+ "','" +DateTime.Now+ "')";
²»ÐÐѽ¡£
½«½Ø¶Ï×Ö·û´®»ò¶þ½øÖÆÊý¾Ý¡£
Óï¾äÒÑÖÕÖ¹¡£
ÔÙÔËÐÐÏÂÃæÕâ¾ä£º
SQL code:
alter table tblcurrenttime alter column ter
Ïà¹ØÎÊ´ð£º
ÎÒÓжà¸ö±íA B C ½á¹¹ÊÇÒ»ÑùµÄ£¬¶¼ÓÐ2¸ö×Ö¶ÎnameºÍcontent,ÎÒÒªËÑË÷ËùÒÔ±íËùÓÐ×Ö¶ÎÖаüº¬¡°Öйú¡±µÄÄÚÈÝ Õâ¸öSQLÓï¾äÔõôд
ÈçºÎ½«¶à¸ö±íµÄ²éѯ½á¹ûÁ¬³ÉÒ»¸ö±í Õâ¸öSQLÓï¾äÔõôд ±íµÄ½á¹¹ÊÇÒ»ÑùµÄ
ÀýÈç£ ......
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jas ......
sqlserver2005 ½¨Á¢µÄÊý¾Ý¿â£¬ÓëÊÖ³Öpda´«ÊäÊý¾Ý£¬×î½üͻȻ³öÏÖÎÞ·¨´«µÝÊý¾ÝµÄÎÊÌ⣬pda¶ËÌáʾµÄ´íÎóʱoutofmemoryexception£¬µ«ÊÇpdaÉÏÃæµÄÈÝÁ¿Ã»ÓÐÎÊÌ⣬
sqlserverµÄÈÕ×ÓÉϵĴíÎóÈçÏ£º
ÈÕÆÚ 2010-1-25 14:45: ......
tab1 ×Ö¶Î:billdate,goodsid,incount,inmoney,outcount,outmoney,endprice,endcount,endamt
tab2 ×Ö¶Î:goodsid,goodskind£¨ÉÌÆ·ÀàÐÍ£©
tab3 ×Ö¶Î:goodskind£¨ÉÌÆ·ÀàÐÍ£©,kindname
½á¹û£º
µÃµ½ÉÌÆ·ÀàÐÍÔÚÒ»¶Îʱ¼ä ......
²éѯѧÉúƽ¾ù³É¼¨¼°ÆäÃû´Î
SELECT 1+(SELECT COUNT( distinct ƽ¾ù³É¼¨)
from (SELECT S#,AVG(score) AS ƽ¾ù³É¼¨
from SC&n ......