![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
sql
itelite39660787
这个作者很懒,什么都没留下…
展开
-
sqlcmd 执行sql脚本
set server="(local)"set database="d:\MyDatabase.mdf"set username="UserName"set password="PassWord"sqlcmd -S %server% -d %database% -U %username% -P %password% -i "d:\MySql.sql"原创 2012-08-07 13:56:17 · 540 阅读 · 0 评论 -
sql 创建数据库
IF EXISTS (SELECT * FROM master..sysdatabases WHERE name = 'MyDatabase') DROP DATABASE MyDatabaseGO USE [master]GOCREATE DATABASE MyDatabaseon PRIMARY ( name = 'MyDatabase原创 2012-08-07 13:51:49 · 430 阅读 · 0 评论 -
Saving changes is not permitted (SQL Server 2008)
原文链接While creating and editing a database in SQL server 2008 I soon ran into a brick wall, or a 'by design' feature of the Database Management Studio.When you design a table in a database and th转载 2012-09-14 14:41:23 · 2287 阅读 · 0 评论 -
sql server 2012 忘记密码
1 命令行: net stop MSSQLServer2 命令行 : net start MSSQLServer /m (以Single User Mode 打开)3 打开 SQL Server Management Studio, Cancle掉Connect to Server对话框4 File->New->Database Engine Query, 出现Connect t原创 2012-12-18 12:10:28 · 5423 阅读 · 1 评论 -
sql 创建表、存储过程、函数 时,判断已存在
以下适用于sqlserver 2008 R2创建表: IF EXISTS (SELECT * FROM sysobjects WHERE id = object_id(N'[dbo].[MyTable]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)DROP TABLE [dbo].[MyTable]GOCREATE TABLE原创 2012-08-07 13:41:27 · 854 阅读 · 0 评论