»ñÈ¡sqlserverÊý¾Ý¿âÖÐËùÓп⡢±í¡¢×Ö¶ÎÃûµÄ·½·¨
»ñÈ¡sqlserverÊý¾Ý¿âÖÐËùÓп⡢±í¡¢×Ö¶ÎÃûµÄ·½·¨
2009Äê03ÔÂ12ÈÕ ÐÇÆÚËÄ ÏÂÎç 12:51
1.»ñÈ¡ËùÓÐÊý¾Ý¿âÃû:
SELECT Name from Master..SysDatabases ORDER BY Name
2.»ñÈ¡ËùÓбíÃû:
SELECT Name from DatabaseName..SysObjects Where XType='U' ORDER BY Name
XType='U':±íʾËùÓÐÓû§±í;
XType='S':±íʾËùÓÐϵͳ±í;
3.»ñÈ¡ËùÓÐ×Ö¶ÎÃû:
SELECT Name from SysColumns WHERE id=Object_Id('TableName')
access :
Èç¹û±í´æÔÚ£¬ÈçºÎµÃµ½Õâ¸ö±í£¿
SELECT *
from MSysObjects where name='ExamResultTime ' and type=1 and flags=0
//µÃµ½¸ÃÊý¾Ý¿âÖÐËùÓеıíÃû
SELECT name from MSysObjects where type=1 and flags=0
Ïà¹ØÎĵµ£º
»·¾³£ºvs2005+sqlserver2005+PowerDesigner 12
´ò¿ªPowerDesigner 12(ÒÔϼò³Æpd)£¬Ð½¨pdm¹¤³Ì£¬ÈçͼËùʾ£º
×¢£ºdbmsÑ¡ÔñÄúÄ¿Ç°ÐèҪת»»µÄÀà±ð£¬ÎÒÓõÄÊÇsqlserver2005¡£
È»ºóÑ¡Ôñ²Ëµ¥¡¶Êý¾Ý¿â¡·¡¶ÏµÍ³DSN¡·£¬Ñ¡Ôñ»òÕßÌí¼ÓÄúÐèÒªµÄÊý¾Ý¿â£¬ÎÒÕâÀïÑ¡ÔñµÄÊÇsql server¡£ÈçͼËùʾ£º
½¨ºÃ ......
1¡¢ÊµÀýÒ»£º
public void SqlConnectionOpen()
{
SqlConnection myConn=new SqlConnection();
myConn.ConnectionString="server=(local);database=pubs;Trusted_Connection=yes";
......
SQLServerÖÐDatetimeÀàÐÍÊý¾ÝµÄ±È½Ï
2009Äê02ÔÂ20ÈÕ ÐÇÆÚÎå 16:40
/* ¶¨Ò忪ʼÈÕÆںͽáÊøÈÕÆÚ*/
declare @date_a datetime,@date_b datetime
set @date_a='2009-2-10'
set @date_b='2009-2-12'
/* ÔÚÈÕÆÚdate_a(°üº¬) ºÍdate_b(²»°üº¬) Ö®¼ä*/
select * from ut_article where createtime between @ ......
SQLÓï¾äÈçÏÂ:
CREATE TABLE [dbo].[test_table] (
[ID] [int] IDENTITY (1, 1) NOT NULL ,
[NAME] [varchar] (80)
)
Éè¼ÆÊÓͼÏÂ,ÔÚÌí¼ÓÒ»¸öINTÐ͵Ä×Ö¶ÎÊÇ,Ñ¡ÖÐÏ·½µÄ"±êʶ"Ϊ"ÊÇ",ÏÂÃæÓÐ"±êʶÖÖ×Ó"ºÍ"±êʶ×ÔÔöÁ¿",¿ÉÒÔ×Ô¼ºÉèÖÃ,ĬÈ϶¼Îª1
µ«ÊDz»ÖªµÀΪʲô,ʹÓÃÈÎÎ ......