.netÁ¬½Ósql server
Êý¾Ý¿âÃû£ºEmployee
±íÃû£ºEmployees
uid£ºsa
pwd£ºsa
ÎÊÌâ²¹³ä£º
×îºÃÊÇÌṩSQL SERVER½Ó¿Ú·ÃÎÊÊý¾Ý¿âµÄ´úÂë
Õâ¶Î´úÂëÊÇVS.NET×Ô¶¯Éú³É£¬ÀïÃæÓÐÄÄЩÊDz»ÐèÒªµÄÄØ£¿Ó¦¸Ã°ÑÊý¾Ý¿âÁ¬½ÓµÄ´úÂë·ÅÔÚÄĸöµØ·½ÄØ£¿
<%@ Page language="c#" Codebehind="WebForm3.aspx.cs" AutoEventWireup="false" Inherits="WebApplication1.WebForm3" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html>
<head>
<title>WebForm3</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name=vs_defaultClientScript content="JavaScript">
<meta name=vs_targetSchema content="http://schemas.microsoft.com/intellisense/ie5">
</head>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
</form>
</body>
</html>
landy543210 µÄ»Ø´ðÊǶԵ쬲»¹ýÓÐЩÎÊÌ⣺
1¡¢ºÜÏÔÈ»LZÔÚwebÓ¦ÓóÌÐòÉÏÊÇÐÂÈË£¬Ö±½Ó¸ø´úÂëLZ¿ÉÄܲ»´óÃ÷°×£»
2¡¢LZµÄÊÇwebÓ¦ÓóÌÐò£¬ËùÒÔMessageBox¾Í²»ÒªÓÃÁË£¬ÒªµÄ»°×Ô¼º·â×°Ò»¸ö£»
3¡¢Ê¹ÓÃsqlÊý¾Ý¿âµÄÁ¬½ÓÓëÃüÁÐèÌí¼ÓÒýÓÃ
using System.Data.SqlClient;
4¡¢LZÌí¼Ó×Ô¼ºµÄÒ³Ãæ¿Ø¼þÓë´¦Àí´úÂëºó£¬È»ºó½«
landy543210µÄ´úÂëÔÚÐÞ¸ÄÏÂÒÔ·ûºÏ×Ô¼ºµÄÒµÎñÐèÇó£¬È»ºóÈ¥µôÏûÏ¢¿ò²¿·Ö£¬ÔÙÌí¼Óµ½×Ô¼ºµÄÏìӦʼþÖУ¬±ÈÈçbutton_click
Ïà¹ØÎĵµ£º
--²éѯ¸¸µ¥Î»µÄº¯Êý
CREATE Function GetParentUnit(@UnitId bigint, @Level int)
Returns @Parents Table([UnitId] int ,[UnitName] nvarchar(64),[ParentUnitId] int)
As
Begin
If @Level < 1 ......
SQLʱ¼ä¶Î²éѯ
ACCESSµÄ»°
select * from table where date1<#2008-1-20# and date2>#2007-8-30#
MYSQLµÄ»°
select * from table where date1<'2008-1-20' and date2>'2007-3-30'
Ò²¿ÉÒÔ
select * from table where date1 between '2008-1-20' and '2007-3-30'
ÆäÖÐdate1,date2¶¼ÊÇÈÕÆÚÀàÐ͵Ä× ......
1. Ö±½ÓÔÚPL/SQL ÖÐÐÞ¸ÄÊý¾Ý
selectÓï¾äºóÃæ¼Ó‘for updata’£¬´ò¿ª½çÃæÉϵÄÐ¡Ëø£¬±à¼£¬°´¹³¹³±£´æ¡£
eg: select * from xtgldxsyncdw for update; ²éѯ½á¹û´°¿ÚµÄÐ¡Ëø¼´¿É´ò¿ª¡£
2. µ¼È˵¼³ötables
tools -->import ......
sqlÊý¾ÝÀàÐÍÏê½â
(1)¶þ½øÖÆÊý¾ÝÀàÐÍ
¡¡¡¡¶þ½øÖÆÊý¾Ý°üÀ¨ Binary¡¢Varbinary ºÍ Image
¡¡¡¡Binary Êý¾ÝÀàÐͼȿÉÒÔÊǹ̶¨³¤¶ÈµÄ(Binary),Ò²¿ÉÒÔÊDZ䳤¶ÈµÄ¡£
¡¡¡¡Binary[(n)] ÊÇ n λ¹Ì¶¨µÄ¶þ½øÖÆÊý¾Ý¡£ÆäÖУ¬n µÄȡֵ·¶Î§ÊÇ´Ó 1 µ½ 8000¡£Æä´æ´¢ñ¿µÄ´óСÊÇ n + 4 ¸ö×Ö½Ú¡£
¡¡¡¡Varbinary[(n)] ÊÇ n λ±ä³¤¶ÈµÄ¶þ½øÖÆÊ ......