ms sql Ò»´Î²åÈë¶àÌõ¼Ç¼µÄÓï¾ä
ÓеÄʱºòÎÒÃÇÐèÒªÒ»´ÎÏñÊý¾Ý¿âÖÐÌí¼Ó¶àÌõ¼Ç¼£¬ÎÒÃÇ¿ÉÒÔʹÓÃÏÂÃæµÄÓï¾äÀ´ÊµÏÖ£º
--Ìí¼ÓÒ»Ìõ¼Ç¼
INSERT INTO tableName(col1,col2,col3) VALUES (1,2,3)
--Ìí¼Ó¶àÌõ¼Ç¼
INSERT INTO tableName(col1,col2,col3)
SELECT 3,4,5
UNION ALL
SELECT 6,7,8
--´ÓÁíÍâµÄÒ»ÕűíÖжÁÈ¡¶àÌõÊý¾ÝÌí¼Óµ½Ð±íÖÐ
INSERT INTO tableName(col1,col2,col3)
SELECT a,b,c from tableA
--´ÓÆäËûµÄ¶àÕűíÖжÁÈ¡Êý¾ÝÌí¼Óµ½Ð±íÖÐ
INSERT INTO tableName(col1,col2,col3)
SELECT a,b,c from tableA WHERE a=1
UNION ALL
SELECT a,b,c from tableB WHERE a=2
ÔÚmysql¿ÉÒÔÕâÑù
insert
into
tablefortest(a,b)
values
(
1
,
2
) ,(
3
,
4
) ,(
5
,
6
)
Ïà¹ØÎĵµ£º
asp.net(C#)ʵÏÖSQL2000Êý¾Ý¿â±¸·ÝºÍ»¹Ô
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.Htm ......
¸Õ×°ÍêÊý¾Ý¿â¾Í±»ÈË·è¿ñɨÃèsa£¬ÎÞ±ÈÓôÃÆ¡£
¸ÄsaÃû³Æ£¬1433¶Ë¿ÚºÅ£¬ÒòΪ¿ª·¢ÐèÒª»¹±ØÐë´ò¿ªÔ¶³ÌÁ¬½Ó£¬½á¹ûÔÚ¿Í»§¶ËÎÞÂÛÈçºÎ¶¼²»ÄÜÁ¬½ÓÉÏ·þÎñÆ÷¡£
¿ñº¹Çë°Ù¶È´óÉñ³öÂí£¬°Ñ¸÷ÖÖÅäÖÃÁ·Á˸öÊ죬½á¹û»¹ÊÇû½â¾ö¡£
¸ãЦµÄÊÇ×îºóÎÞÒâÖÐÔÚMicrosoftÂÛ̳ÉÏ¿´µ½Õâôһ¾ä£¬ÐÞ¸ÄÍê¶Ë¿ÚºÅ£¬ÔÚ¿Í»§¶ËµÇ¼µÄʱºòÒªÔÚIPºóÃæ£«¶ººÅ£«¶Ë¿Úº ......
selectÓï¾äǰ¼Ó£º
declare @d datetime
set @d=getdate()
²¢ÔÚselectÓï¾äºó¼Ó£º
select [Óï¾äÖ´Ðл¨·Ñʱ¼ä(ºÁÃë)]=datediff(ms,@d,getdate())
ת×Ô£º¶¯Ì¬ÍøÖÆ×÷Ö¸ÄÏ www.knowsky.com
ÕâÊǼòÒ׵IJ鿴ִÐÐʱ¼äµÄ·½·¨¡£
===========================================£¨Ò»ÏÂÄÚÈÝת×Ô£º£Ã£Ó£Ä£Î£©
MSSQL ServerÖÐͨ¹ý²é ......
ʹÓÃSQLÓï¾ä
SQLÓïÑÔ°üÀ¨Êý¾Ý²éѯÓïÑÔ(SELECT)¡¢Êý¾Ý²Ù×ÝÓïÑÔ(INSERT¡¢UPDATE¡¢DELETE)¡¢ÊÂÎñ¿ØÖÆÓïÑÔ(COMMIT¡¢ROLLBACK¡¢SAVEPOINT)¡¢Êý¾Ý¶¨ÒåÓïÑÔ(CREATE TABLE¡¢ALTER TABLE¡¢DROP)¡¢Êý¾Ý¿ØÖÆÓïÑÔ(GRANT¡¢REVOKE)µÈÎå¸ö²¿·Ö¡£
µ±±àдPL/SQLÓ¦ÓóÌÐòʱ£¬Ö»ÄÜÖ±½ÓǶÈëSELECT ......
C# Êý¾Ý¿âÖ®ÂÃ……
¼ÌÐø½ø¹¥²ã³ö²»ÇîµÄproblems
ÔÚÉÏһƪÄÚÈݵĻù´¡ÉÏ£¬ÎÒÓÖ×÷ÒԸĽø£¬ÏÖÔÚµÄÇé¿öÊÇÕâÑùµÄ£º
//In Browseuser form
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System ......