ghx88

文章分类 -  SQL server

使用Exists关键字检查所查的数据是否存在
摘要:Create Procedure AddUniqueProduct @ProductName NVarchar(80), @UnitPrice Money AS if Exists BEGIN select ProductName From Products Where ProductName =@ProductName Return 1 END... 阅读全文

posted @ 2005-03-26 10:00 ghx88 阅读(199) 评论(0) 推荐(0) 编辑

存储过程中日期格式的转换
摘要:SELECT CONVERT(char(10),birthday,120) AS birthday FROM employee 将本来的1999-08-08 00:00:00 转变成 1999-08-08也可以在Asp.net 中用 String.Format()格式化文本,如DataTime.Now.ToString("t"); //只取时间部分 11:36:52 PMDataTime.No... 阅读全文

posted @ 2005-03-26 09:59 ghx88 阅读(1019) 评论(0) 推荐(0) 编辑

导航

统计

点击右上角即可分享
微信分享提示