惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tenable Blog
Last Week in AI
Last Week in AI
P
Proofpoint News Feed
Engineering at Meta
Engineering at Meta
H
Help Net Security
F
Fortinet All Blogs
MyScale Blog
MyScale Blog
宝玉的分享
宝玉的分享
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - 司徒正美
量子位
N
Netflix TechBlog - Medium
Apple Machine Learning Research
Apple Machine Learning Research
小众软件
小众软件
Recorded Future
Recorded Future
博客园 - 三生石上(FineUI控件)
Vercel News
Vercel News
aimingoo的专栏
aimingoo的专栏
I
InfoQ
Microsoft Security Blog
Microsoft Security Blog
Scott Helme
Scott Helme
The Last Watchdog
The Last Watchdog
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
IT之家
IT之家
AI
AI
WordPress大学
WordPress大学
Security Archives - TechRepublic
Security Archives - TechRepublic
Google Online Security Blog
Google Online Security Blog
U
Unit 42
V2EX - 技术
V2EX - 技术
MongoDB | Blog
MongoDB | Blog
Schneier on Security
Schneier on Security
博客园 - Franky
H
Heimdal Security Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
W
WeLiveSecurity
P
Privacy & Cybersecurity Law Blog
Cloudbric
Cloudbric
B
Blog RSS Feed
N
News | PayPal Newsroom
S
Securelist
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
I
Intezer
Hacker News - Newest:
Hacker News - Newest: "LLM"
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
博客园_首页
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
雷峰网
雷峰网

博客园 - niuyy

博文阅读密码验证 - 博客园 博文阅读密码验证 - 博客园 博文阅读密码验证 - 博客园 .net 中用到excel中,检索COM类工厂中的CLSID为{000 24500-0000-0000-C000-000000000046}的组件时失败 客户端获取传递的参数 JS给RadioButtonList赋值 在SQL2000中不显示系统表及系统文件 Embed标签详解 可以拖动,关闭的DIV组合 获取计算机用户名 浏览器字体变小 学习小技巧 ComBox 绑定数据库 C# 读取文本文件 字符编码 ComboBox与其他控件的联动 在.net中应用事务 数据库索引应用(ms-sql) 开发人员组要注意的网站 C# 在.cs文件中使用正则表达式
SQL语句中,插入单引号、添加、删除字段
niuyy · 2009-07-03 · via 博客园 - niuyy

1、插入单引号如果不转化的话,字符串插入到数据库中错误的,只要在字符串中有单引号的地方在加一个单引号即可。
    例如:在数据库插入'井下设备' :
    insert into Static_Belong(BelongValue) values ('''井下设备''')
    为什么是3个单引号呢?
     注:'井下设备' 本来是要插入的一个字符串,根据values('字符串'),因为字符串里有单引号为了转化要在字符串外在加
     一对单引号,即''井下设备'',现在字符串变成''井下设备'',套入values('字符串')格式即values('''井下设备'')
    嘿嘿,如果是变量,只要用Contains,Replace函数即可。
2、向表中添加字段:
    alter   table   StaticAccount   add   [Belong]   nvarchar(50) default '井下设备';
    其中StaticAccount 为表名,Belong为字段名
3、删除表中的字段:
    alter  table  StaticAccount  drop   column  WindPressure
    其中StaticAccount 为表名,WindPressure为字段名

posted on 2009-07-03 18:24  niuyy  阅读(7900)  评论()    收藏  举报