知行合一

享受过程 漠视结果

导航

随笔分类 -  ms sqlserver

mysql简单命令示例
摘要:C:\mysql\bin>mysql-uroot-pEnterpassword:****WelcometotheMySQLmonitor.Commandsendwith;or\g.YourMySQLconnectionidis4Serverversion:5.0.51b-community-ntMySQLCommunityEdition(GPL)Type'help;'or'\h'forhelp.Type'\c'toclearthebuffer.mysql>showdatabases;+--------------------+|Dat 阅读全文

posted @ 2012-01-06 17:41 项羽 阅读(283) 评论(0) 推荐(0)

批量删除表
摘要:CREATEPROCEDUREdropTable@tableNamevarchar(40)ASdeclarecurcursorread_onlyforselectdistincttable_namefrominformation_schema.columnswheretable_namelike@tableNamedeclare@namevarchar(40),@sqlvarchar(1000)opencurfetchnextfromcurinto@namewhile(@@fetch_status=0)beginset@sql='droptable'+@nameexec(@sq 阅读全文

posted @ 2011-03-08 10:53 项羽 阅读(228) 评论(0) 推荐(1)

查询表占用空间
摘要:exec sp_MSforeachtable 'cranedata'exec sp_spaceused 'cranedata20101227'exec sp_MSforeachtable "exec sp_spaceused '?'" 阅读全文

posted @ 2010-12-28 12:27 项羽 阅读(158) 评论(0) 推荐(0)

Access中参数错误的问题
摘要:string sql = "update tb_type set typename=@typename,describe2=@describe2 where id=@id"; OleDbParameter[] parameters = { new OleDbParameter("@typename", OleDbType.VarChar,50), new OleDbParameter("@des... 阅读全文

posted @ 2010-11-04 16:28 项羽 阅读(226) 评论(0) 推荐(0)

tsmsbs项目中用到的触发器和存储过程
摘要:代码Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/----触发器createtriggertg_cranedataondbo.CraneDataforinsertasbegindeclare@idint,@craneidint,@acttimedatet... 阅读全文

posted @ 2010-07-16 15:24 项羽 阅读(263) 评论(0) 推荐(0)

sqlserver把时间格式化成你想要的格式
摘要:Select CONVERT(varchar(100), GETDATE(), 0): 05 16 2006 10:57AM Select CONVERT(varchar(100), GETDATE(), 1): 05/16/06 Select CONVERT(varchar(100), GETDATE(), 2): 06.05.16 Select CONVERT(varchar(100), GE... 阅读全文

posted @ 2010-07-15 17:23 项羽 阅读(997) 评论(0) 推荐(0)

sql server 常用
摘要:代码 Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/----事务SETTRANSACTIONISOLATIONLEVELREPEATABLEREADbegintransaction--insertdeleteupdateselectif@@error&l... 阅读全文

posted @ 2010-05-12 10:46 项羽 阅读(211) 评论(0) 推荐(0)