常见SQL语句
2016-03-09 15:31
218 查看
1、表结构修改
alter table <表名>[add<字段名><数据类型>]|[drop<字段名>]
alter table patient add address char(50)
2、表记录插入
insert into <表名>[<字段1>]values(<常量1>[,,,])
3、表记录修改
update patient set sex=’女’where pationid=’1001’
4、表记录查询
select name from patient where age<=18
alter table <表名>[add<字段名><数据类型>]|[drop<字段名>]
alter table patient add address char(50)
2、表记录插入
insert into <表名>[<字段1>]values(<常量1>[,,,])
3、表记录修改
update patient set sex=’女’where pationid=’1001’
4、表记录查询
select name from patient where age<=18
相关文章推荐
- 简单的node连接redis及操作
- memcache和redis区别
- 分布式数据库
- Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
- 实战 SQL Server 2008 数据库误删除数据的恢复
- 高性能网站架构之缓存篇—Redis集群搭建
- MySQL索引(未完待续)
- redis configuration
- 关闭MongoDB
- sqlplus中break命令的使用
- MySQL查询不到中文的问题
- MongoDB configuration
- 数据库中 有则更新,无则插入的实现
- sql语句优化
- postgre-隐藏系统列
- MySQL知识大搜索
- 15 个常用的 SQL Server 高级语法
- Redis和Memcache的区别分析
- 关于mysql主从的数据同步不一致的解决方法
- MongoDB复制集之:概念及特点