一.SQL入门语句之LIKE LIKE用来匹配通配符指定模式的文本值.如果搜索表达式与模式表达式匹配,LIKE 运算符将返回真(true),也就是 1.这里有两个通配符与 LIKE 运算符一起使用,百分号(%)代表零个.一个或多个数字或字符.下划线(_)代表一个单一的数字或字符.这些符号可以被组合使用. 1.查找字段A以AAA开头的任意值 select * from table_name where 字段A like 'AAA%' 2.查找字段A任意位置包含AAA的任意值 select * fr
1.C#中提供的DataReader可以从数据库中每次提取一条数据. using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Data.OleDb; using System.Drawing; using System.Text; using System.Windows.Forms; namespace WindowsApplicat
一 命令行模式下: mysql -u root -p # 进入进入mysql命令行模式 show databases; # 查看所有数据库 create database data; # 创建数据库,名为data use blog; # blog 是一个数据库名 show tables; create table persons( personid int, name varchar() ); # 在数据库下创建表persons. show columns from post; # post是数
Oracle的select用法(部分): 1.查询所有: select * from employees; 2.加上where子句:用选择限制行 select * from employees where SALARY<8000; 查询 employees中salary小于8000的所有人信息: 3.Where子句_IS NULL和is not null select employee_id,last_name from employees where COMMISSION_PCT is nul
Table A aid adate 1 a1 2 a2 3 a3 TableB bid bdate 1 b1 2 b2 4 b4 两个表a,b相连接,要取出id相同的字段 select * from a inner join b on a.aid = b.bid这是仅取出匹配的数据. 此时的取出的是: 1 a1 b1 2 a2 b2 那么left join 指: select * from a left join b on a.aid = b.b