贵州省兴义汽车运输总公司监控中心
公司简介
联系我们
公司动态
行业动态
综合资讯
政策法规
图片新闻
通知公告
手机号码:18585916868 18585916177
电话:0859-3813059 15718590942
E-mail:469136212@qq.com
联系人:赵久福
地址:贵州省兴义市西湖路146号
   
 
 首页>政策法规>Sql Server
 
 
Sql Server 和 Access 操作数据库结构Sql语句小结
来源:互联网 作者:不详   发布时间: 2011-06-15    阅读:31849

下面是Sql Server 和 Access 操作数据库结构的常用Sql,希望对你有所帮助。
内容由海娃整理,不正确与不完整之处还请提出,谢谢。
新建表:
create table [表名]
(
[自动编号字段] int IDENTITY (1,1) PRIMARY KEY ,
[字段1] nVarChar(50) default '默认值' null ,
[字段2] ntext null ,
[字段3] datetime,
[字段4] money null ,
[字段5] int default 0,
[字段6] Decimal (12,4) default 0,
[字段7] image null ,
)
删除表:
Drop table [表名]
插入数据:
Insert INTO [表名] (字段1,字段2) VALUES (100,'51WINDOWS.NET')
删除数据:
Delete FROM [表名] Where [字段名]>100
更新数据:
Update [表名] SET [字段1] = 200,[字段2] = '51WINDOWS.NET' Where [字段三] = 'HAIWA'
新增字段:
Alter TABLE [表名] ADD [字段名] NVARCHAR (50) NULL
删除字段:
Alter TABLE [表名] Drop COLUMN [字段名]
修改字段:
Alter TABLE [表名] Alter COLUMN [字段名] NVARCHAR (50) NULL
重命名表:(Access 重命名表,请参考文章:在Access数据库中重命名表)
sp_rename '表名', '新表名', 'OBJECT'
新建约束:
Alter TABLE [表名] ADD CONSTRAINT 约束名 CHECK ([约束字段] <= '2000-1-1')
删除约束:
Alter TABLE [表名] Drop CONSTRAINT 约束名
新建默认值
Alter TABLE [表名] ADD CONSTRAINT 默认值名 DEFAULT '51WINDOWS.NET' FOR [字段名]
删除默认值
Alter TABLE [表名] Drop CONSTRAINT 默认值名
删除Sql Server 中的日志,减小数据库文件大小
dump transaction 数据库名 with no_log
backup log 数据库名 with no_log
dbcc shrinkdatabase(数据库名)
exec sp_dboption '数据库名', 'autoshrink', 'true'


上一篇: SQL Server 数据库管理常用的SQL和T-SQL语句
下一篇: 没有文章了

 相关评论

  评论人:colorado videos   评论时间:2018-12-10 04:58:25
You completed certain good points there. I did a search on the subject and found a good number of people will go along with with your blog. https://www.youtube.com/playlist?list=PLY0UKg3Goijc5HoiB3eUiFwnCfnjO78qp

  评论人:sa   评论时间:2018-12-09 21:55:29
Say, you got a nice blog post.Thanks Again. http://www.hotelsclubantalya.com

  评论人:escort bayan izmir   评论时间:2018-12-09 13:37:42
I cannot thank you enough for the post.Really looking forward to read more. Cool. http://www.kwiklead.net/

  评论人:wine insiders   评论时间:2018-12-09 13:17:14
That really is a brilliant way of thinking about it. Thank you for sharing your information with me. This is excellent, a real eye opener for sure! I could not stop myself from commenting. This might be a weird thing to to say but... I really love your pages. This website looks just like one I used to have. http://www.rockpop60.it/pinasiob/userinfo.php?uid=4457741

  评论人:sa   评论时间:2018-12-09 00:52:44
Thank you for your blog article.Really looking forward to read more. Will read on鈥? http://humpaki.com/

  评论人:Sung Lonsdale   评论时间:2018-12-08 21:38:42
Wow! its a Very Nice Blog, thankyou for writing such a beautiful blog, i really loved it just the way i like this one.[url="https://www.backlinkdir.com/support-for-safari.html"]Safari support Canada[/url] https://yessica.info/index.html

  评论人:colorado springs domestic violence attorney   评论时间:2018-12-08 18:27:51
Today, I went to the beach front with my children. I found a sea shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is completely off topic but I had to tell someone! http://cli.re/gvbBzN

  评论人:Fun88   评论时间:2018-12-07 15:31:29
<p>Hiya, I am really glad I have found this information. Today bloggers publish just about gossips and internet and this is actually irritating. A good site with exciting content, this is what I need. Thanks for keeping this web-site, I will be visiting it. Do you do newsletters? Can not find it.</p> http://fun88nhacai.net/

  评论人:go   评论时间:2018-12-06 07:43:57
I would like to thnkx for the efforts you have put in writing this blog. I am hoping the same high-grade blog post from you in the upcoming as well. In fact your creative writing abilities has inspired me to get my own blog now. Really the blogging is spreading its wings quickly. Your write up is a good example of it. https://bit.ly/2zIvrHE

  评论人:sa   评论时间:2018-12-04 00:43:45
I cannot thank you enough for the blog post.Really looking forward to read more. Awesome. www.dizipartner.com

  评论人:Home is a feeling   评论时间:2018-12-03 17:41:37
Wow, great blog article.Really thank you! Keep writing. https://twynedocs.com/wp-content/uploads/home-is-not-a-place.jpg

  评论人:w88   评论时间:2018-12-03 16:27:23
<p>I always emailed this web site post page to all my friends, as if like to read it next my contacts will too.</p> http://w88tops.net/

  评论人:sa   评论时间:2018-12-03 11:09:41
I cannot thank you enough for the post.Really looking forward to read more. Cool. www.hotelsclubantalya.com

  评论人:Jamal   评论时间:2018-12-02 09:25:02
Having read this I thought it was very informative. I appreciate you taking the time and effort to put this article together. I once again find myself spending way to much time both reading and commenting. But so what, it was still worth it! http://tinyurl.com/yao5y3jt

  评论人:Baume du tigre   评论时间:2018-12-02 07:30:00
www.baumetigre.com

  评论人:더킹카지노   评论时间:2018-12-02 05:10:41
Hello there, just became alert to your blog through Google, and found that it is really informative. I am going to watch out for brussels. I will be grateful if you continue this in future. A lot of people will be benefited from your writing. Cheers! 더킹카지노 쿠폰 - http://bbs-ql.zulong.com/home.php?mod=space&uid=2157889&do=profile http://minzakup.rtyva.ru/page/829648

  评论人:Law Firm website design   评论时间:2018-12-01 09:25:00
small law firm web design - https://is.gd/Buxcql http://LawFirm-webdesign.com/

  评论人:Joanna Dehnert   评论时间:2018-11-30 14:55:08
<p>Really nice style and excellent subject matter, hardly anything else we require : D.</p> http://turboagram.com/5bQT

  评论人:Armand Kolden   评论时间:2018-11-30 09:19:10
Thankyou for your this amazing writing on above topic, please keep helping us in future as well by providing similar content on internet all the time. [url="https://www.scislides.com/incredimail-customer-service-phone-number.php"]Hotmail Help[/url] https://yessica.info/yahoo-support-help-center.html

  评论人:sa   评论时间:2018-11-30 06:51:40
Say, you got a nice blog post.Thanks Again. http://www.antalyatourismguide.com

  评论人:new abstract art paintings   评论时间:2018-11-30 02:57:04
Thanks so much for the blog article.Much thanks again. Keep writing. https://www.virtosuart.com/blog/abstract-artist-gheorghe-virtosu

  评论人:ter枚rist israil   评论时间:2018-11-29 18:11:44
I cannot thank you enough for the blog post.Really looking forward to read more. Awesome. https://twitter.com/hashtag/izmirescort

  评论人:Debby Lofman   评论时间:2018-11-29 13:39:55
I would love to add when you do not surely have an insurance policy or you do not form part of any group insurance, you could possibly well make use of seeking aid from a health insurance broker. Self-employed or those that have medical conditions usually seek the help of one health insurance brokerage. Thanks for your text. https://www.youtube.com/watch?v=JuHyi9OAeDM

  评论人:jagez   评论时间:2018-11-29 04:09:09
Wow, great blog article. Really Cool. http://jageze.blogspot.com/2011/10/land-oplichterij-fraud-groza-bv.html

  评论人:Visit Website   评论时间:2018-11-28 23:08:31
Amazing Homemade Beauty Tips Made Easy in Hindi Nuskhe आयुर्वेदिक उपचार - http://john5blogs.weebly.com/blog1/natural-tips-for-glowing-skin-in-ayurvedic-upay http://okashi-oroshi.net/modules/wordpress/wp-ktai.php?view=redir&url=http3A//www.hindinuskhe.in

  评论人:anatoliy kirik   评论时间:2018-11-28 15:26:31
Thanks so much for the blog. Great. https://www.rapsheets.org/washington/everett-jail/DUTOV_ANATOLIY/201800010992

  评论人:sa   评论时间:2018-11-28 08:55:27
Thank you for your blog article.Really looking forward to read more. Will read on鈥? http://www.konyalisunnet.com/

  评论人:sa   评论时间:2018-11-28 08:47:33
Thank you for your blog article.Really looking forward to read more. Will read on鈥? http://www.konyalisunnet.com/

  评论人:sa   评论时间:2018-11-27 20:24:37
I cannot thank you enough for the blog post.Really looking forward to read more. Awesome. http://www.konyalisunnet.com/

  评论人:sa   评论时间:2018-11-26 21:54:19
I cannot thank you enough for the blog post.Really looking forward to read more. Awesome. http://www.nelfr.com

  评论人:hindi nuskhe   评论时间:2018-11-26 18:34:23
Read Just What Is Aerobics? in Gharelu Nuskhe हेल्थ टिप्स 芒鈧?Health Tips - https://penzu.com/public/ace524f4 http://www.hindinuskhe.in/

  评论人:sa   评论时间:2018-11-26 03:13:42
I cannot thank you enough for the post.Really looking forward to read more. Cool. http://www.antalyatourismguide.com/

  评论人:e111 card   评论时间:2018-11-25 18:03:53
I truly appreciate this blog.Really looking forward to read more. Keep writing. https://e111cards.co.uk/

  评论人:sa   评论时间:2018-11-25 07:36:42
Say, you got a nice blog post.Thanks Again. http://mimli.net/

  评论人:Joey Gabeline   评论时间:2018-11-25 03:00:04
Wow! its a Very Nice Blog, thankyou for writing such a beautiful blog, i really loved it just the way i like this one.[url="https://www.backlinkdir.com/support-for-alienware.html"]Alienware help Canada[/url] https://www.scislides.com/comcast-xfinity-password-problem-recovery.php

  评论人:best selling vibrators   评论时间:2018-11-24 19:43:53
Hey, thanks for the blog article.Really thank you! Much obliged. https://www.youtube.com/watch?v=G1B4IWWRMwY

  评论人:dildo   评论时间:2018-11-24 02:36:39
Say, you got a nice article.Much thanks again. Really Cool. https://aesextoylist.wordpress.com/2018/11/19/8-inch-all-american-whopper-dong-top-5-dildos-for-women/

  评论人:Pavaje beton amprentat Bacau preturi   评论时间:2018-11-23 15:39:24
wow, awesome post.Much thanks again. Want more. https://www.youtube.com/watch?v=q5Qbeg9igd8

  评论人:sa   评论时间:2018-11-23 10:12:16
I appreciate you sharing this blog article. Much obliged. http://www.nelfr.com

  评论人:sa   评论时间:2018-11-22 21:55:58
I cannot thank you enough for the blog post.Really looking forward to read more. Awesome. http://www.favoriizmir.com/

  评论人:sa   评论时间:2018-11-22 08:24:56
Thank you for your blog article.Really looking forward to read more. Will read on鈥? http://racook.com/

  评论人:source   评论时间:2018-11-21 22:29:13
Click here for Top 7 Tips To Achieve Total Health And Wellness in Gharelu Nuskhe आयुर्वेदिक उपचार इन हिंदी नुस्खे - https://issuu.com/john6diary/docs/natural-health-and-beauty-tips_-dri http://www.HindiNuskhe.in/

  评论人:ब्यूटी टिप्स - Beauty Tips in Hindi Nuskhe   评论时间:2018-11-20 23:03:22
Most amazing Changes to Your Diet and Multiple Sclerosis in Beauty Tips आयुर्वेदिक उपचार इन हिंदी नुस्खे - https://penzu.com/public/183df1a0

  评论人:sa   评论时间:2018-11-20 16:59:39
Say, you got a nice blog post.Thanks Again. http://mimli.net/

  评论人:Lottery Data   评论时间:2018-11-19 22:16:50
Im grateful for the blog article.Thanks Again. Really Cool. https://goo.gl/PxvTp3

  评论人:sa   评论时间:2018-11-19 06:40:54
I appreciate you sharing this blog article. Much obliged. http://mimli.net/

  评论人:邪袟蟹褦褧鈩栃♀剸褦袧袝露些袔袔庐袥袘孝袙   评论时间:2018-11-19 05:57:03
Looking forward to reading more. Great article.Really thank you! http://jackpotsvtv.onlinetechjournal.com/locating-common-sense-solutions-in-roulette

  评论人:Calendario laboral de Vitoria 2019   评论时间:2018-11-19 00:26:12
Thanks-a-mundo for the post.Really thank you! Cool. https://pintoresvitoria.com/calendario-laboral-de-alava-2019/

  评论人:how to start a podcast   评论时间:2018-11-18 01:03:05
"Thanks again for the post.Much thanks again. Great." https://www.goodreads.com/user/show/89417830-liliana-jones

  评论人:Narcisa Keogh   评论时间:2018-11-17 19:53:08
Life is a great journey and to live it fully one has to be a great learner all the time. Reading such piece of information can teach you alot. Thankyou for sharing it with the world. https://www.scislides.com/Amazon-Cloud-Contact-Support-Phone-Number.php

  评论人:roofing contractor ct   评论时间:2018-11-17 19:52:08
"You have made some decent points there. I checked on the net to find out more about the issue and found most people will go along with your views on this website." https://www.fanfiction.net/~tedwe6standl

  评论人:http://www.cryptocurrencyexperts.org   评论时间:2018-11-17 16:47:54
Im thankful for the blog. Will read on... http://cryptocurrencyexperts.org/

  评论人:K8pro   评论时间:2018-11-17 13:58:25
<p>I鈥檓 not sure why but this web site is loading extremely slow for me. Is anyone else having this problem or is it a issue on my end? I鈥檒l check back later and see if the problem still exists.</p> http://luatphapcacuoc.com/

  评论人:Refugio Beskom   评论时间:2018-11-17 07:40:16
Do you have a spam issueproblem on this sitewebsiteblog; I also am a blogger, and I was curious aboutwanting to knowwondering your situation; many of uswe have createddeveloped some nice proceduresmethodspractices and we are looking to swaptradeexchange solutionsstrategiesmethodstechniques with other folksothers, why notbe sure toplease shoot me an e-mailemail if interested. https://www.stumbleupon.com/su/19073z

  评论人:Pei Wei Menu   评论时间:2018-11-15 15:46:02
Thanks for the article.Much thanks again. Really Cool. https://www.educacionfinancieraparatodos.com/5371/sonic-menu-you-will-want-to-see-this/

  评论人:watch Spider-Man Homecoming hindi   评论时间:2018-11-14 05:56:54
Very good post.Much thanks again. Really Cool. https://hdmovieshome.com/movies/spider-man-homecoming/

  评论人:business administration   评论时间:2018-11-13 18:08:01
I truly appreciate this blog. Keep writing. https://thebizqube.com/

  评论人:farming simulator 19 mods   评论时间:2018-11-13 06:15:18
I am not a movie review Writer but this article is really entertaining http://www.farming2015mods.com/category/farming-simulator-19-mods/

  评论人:sa   评论时间:2018-11-13 01:39:13
Say, you got a nice blog post.Thanks Again. www.kauntar.com/

  评论人:sa   评论时间:2018-11-12 16:47:16
I cannot thank you enough for the post.Really looking forward to read more. Cool. http://www.dizipartner.com

  评论人:boxer puppies for sale in pa   评论时间:2018-11-11 08:04:12
Thank you ever so for you post.Really thank you! Awesome. https://eastcoastboxers.com/

  评论人:sa   评论时间:2018-11-10 17:18:16
I cannot thank you enough for the post.Really looking forward to read more. Cool. http://www.nelfr.com

  评论人:Law firm Web design studio   评论时间:2018-11-10 16:53:24
Hello there, just became aware of your blog through Google, and found that it is really informative. I am going to watch out for brussels. I will be grateful if you continue this in future. Numerous people will be benefited from your writing. Cheers! Find Your Law Firm in SERP With Proper Keyword Analysis http://bit.ly/2R4NwWI Http://bit.ly/2KBycOE

  评论人:webroot.com/safe   评论时间:2018-11-10 06:26:01
I really like your blog, I hope you will continue such work. Thankyou! https://wwwwebroot-com-safe.us

  评论人:click here   评论时间:2018-11-09 23:11:30
I really love reading this article. https://is.gd/mQmeQF-

  评论人:sa   评论时间:2018-11-09 20:25:35
A big thank you for your blog article.Thanks Again. Want more. http://www.cokucuzasite.com

  评论人:sa   评论时间:2018-11-09 17:18:54
I appreciate you sharing this blog article. Much obliged. http://www.dizipartner.com

  评论人:farming simulator 19 mods   评论时间:2018-11-09 15:42:35
Im grateful for the blog post. Really Great. http://www.farming2015mods.com/category/farming-simulator-19-mods/

  评论人:sa   评论时间:2018-11-08 18:15:47
A big thank you for your blog article.Thanks Again. Want more. http://www.cokucuzasite.com

  评论人:sa   评论时间:2018-11-08 17:51:57
Say, you got a nice blog post.Thanks Again. www.kauntar.com/

  评论人:sa   评论时间:2018-11-08 05:36:49
I cannot thank you enough for the post.Really looking forward to read more. Cool. www.dizipartner.com/

  评论人:sa   评论时间:2018-11-07 05:50:01
Thank you for your blog article.Really looking forward to read more. Will read on鈥? http://dovmeciizmir.com

  评论人:sa   评论时间:2018-11-06 06:36:17
I cannot thank you enough for the blog post.Really looking forward to read more. Awesome. http://www.kauntar.com/

  评论人:black dildo   评论时间:2018-11-06 00:15:37
Say, you got a nice post.Much thanks again. Fantastic. https://www.youtube.com/watch?v=3idzWEALcPc

  评论人:double penetration dildo   评论时间:2018-11-05 19:09:59
I think this is a real great blog post. Cool. https://www.youtube.com/watch?v=5eQUH33eI7M

 发表评论
 呢称:
 评论内容:
 验证码: 图片看不清?点击重新得到验证码
 

Google
  网站备案/许可证号
12345678
Copyright 2010 。贵州省兴义汽车运输总公司车载卫星定位监控中心. All rights reserved. 技术支持:黔西南州GPS监控中心