在线sql编写
@利菊1716:使用SQL语言编写程序 在线等 急! -
常峡13420127375…… 1:select count(*) from student where name like '李%' 2:select count(t1.*) from student t1,city t2 where t1.cityid=t2.cityid and t2.cityname like '北京%'3:select t2.cityname,sum(t1.name) as 人数 from student t1,city t2 where t1.cityid=t2.cityid group by cityname
@利菊1716:编写SQL语句 -
常峡13420127375…… 首先需要解析身份证编号字段获取出生年份.然后对年份进行分组汇总.参考语句:mssql 使用 substring(字符串表达式,开始位置,长度)截取字符串select 年份,count(*) from(select id,substring(身份证,6,4...
@利菊1716:sql如何写 -
常峡13420127375…… 创建之前判断该数据库是否存在 if exists (select * from sysdatabases where name='databaseName') drop database databaseName go Create DATABASE databasename on primary-- 默认就属于primary文件组,可省略 (/*--数据文件的具体描述-...
@利菊1716:sql语句的编写 -
常峡13420127375…… --这个可以,已经试了select deptname,isnull(sum_emp,0),isnull(sum_outemp,0)from (contra left outer join (select deptid,count(*)as sum_emp from employee group by deptid)as emp1 on cont...
@利菊1716:我想从数据库抓出最新时间的那条数据 ,sql语句怎么写?在线等 -
常峡13420127375…… SELECT TOP 1 * FROM 表 ORDER BY cdate desc要这样? sqlserver的写法
@利菊1716:简单SQL语言编写.在线求答案 -
常峡13420127375…… select * from 商品表 where 名称='PG 抽湿机' and 售价='2980';insert into 商品表 values ('S0005','GT清洁系列','1KG','2012-2-3','200');update 商品表 set 重量='2KG', 售价='600' where ID='S0010';delete from 商品表 where ID='S0008' or ID='S0009';
@利菊1716:写sql语句 在线求租!!!谢谢了!!!! -
常峡13420127375…… 1.insert into temp1select * from 顾客表 where name like '李%' or name like '刘%' order by 单位2.select * from 顾客表 where name not in (select name from 购物表) 在查询分析器里,按右键选择:结果保存为文件.然后敲入查询语句select 字段名...
@利菊1716:oracle 根据里面字段的日期统计出每月总金额的sql语句怎么写在线等 -
常峡13420127375…… oracle 根据里面字段的日期统计出每月总金额的sql语句怎么写在线等 如果是date型123 select to_char(createtime,'yyyymm'),sum(totacaccount) from 表名 where to_char(createtime,'yyyy')=to_char(sysdate,'yyyy') group by to_char(createtime,'yyyymm')...
@利菊1716:编写sql语句时 按什么键可以及时获得在线帮助资料 -
常峡13420127375…… oracle sqlplus 执行sql命令为: 以命令行方式运行SQL命令,只需要在输入完SQL语句之后,输入分号(;),或者在新的一行输入前斜线(/),按回车键即可 SQL> SELECT ename,sal FROM emp
@利菊1716:sql保留两位小数怎么写,在线等!
常峡13420127375…… select Convert(decimal(18,2),100.1231234) 输出结果:100.12 select Convert(decimal(18,2),100) 输出结果:100.00
常峡13420127375…… 1:select count(*) from student where name like '李%' 2:select count(t1.*) from student t1,city t2 where t1.cityid=t2.cityid and t2.cityname like '北京%'3:select t2.cityname,sum(t1.name) as 人数 from student t1,city t2 where t1.cityid=t2.cityid group by cityname
@利菊1716:编写SQL语句 -
常峡13420127375…… 首先需要解析身份证编号字段获取出生年份.然后对年份进行分组汇总.参考语句:mssql 使用 substring(字符串表达式,开始位置,长度)截取字符串select 年份,count(*) from(select id,substring(身份证,6,4...
@利菊1716:sql如何写 -
常峡13420127375…… 创建之前判断该数据库是否存在 if exists (select * from sysdatabases where name='databaseName') drop database databaseName go Create DATABASE databasename on primary-- 默认就属于primary文件组,可省略 (/*--数据文件的具体描述-...
@利菊1716:sql语句的编写 -
常峡13420127375…… --这个可以,已经试了select deptname,isnull(sum_emp,0),isnull(sum_outemp,0)from (contra left outer join (select deptid,count(*)as sum_emp from employee group by deptid)as emp1 on cont...
@利菊1716:我想从数据库抓出最新时间的那条数据 ,sql语句怎么写?在线等 -
常峡13420127375…… SELECT TOP 1 * FROM 表 ORDER BY cdate desc要这样? sqlserver的写法
@利菊1716:简单SQL语言编写.在线求答案 -
常峡13420127375…… select * from 商品表 where 名称='PG 抽湿机' and 售价='2980';insert into 商品表 values ('S0005','GT清洁系列','1KG','2012-2-3','200');update 商品表 set 重量='2KG', 售价='600' where ID='S0010';delete from 商品表 where ID='S0008' or ID='S0009';
@利菊1716:写sql语句 在线求租!!!谢谢了!!!! -
常峡13420127375…… 1.insert into temp1select * from 顾客表 where name like '李%' or name like '刘%' order by 单位2.select * from 顾客表 where name not in (select name from 购物表) 在查询分析器里,按右键选择:结果保存为文件.然后敲入查询语句select 字段名...
@利菊1716:oracle 根据里面字段的日期统计出每月总金额的sql语句怎么写在线等 -
常峡13420127375…… oracle 根据里面字段的日期统计出每月总金额的sql语句怎么写在线等 如果是date型123 select to_char(createtime,'yyyymm'),sum(totacaccount) from 表名 where to_char(createtime,'yyyy')=to_char(sysdate,'yyyy') group by to_char(createtime,'yyyymm')...
@利菊1716:编写sql语句时 按什么键可以及时获得在线帮助资料 -
常峡13420127375…… oracle sqlplus 执行sql命令为: 以命令行方式运行SQL命令,只需要在输入完SQL语句之后,输入分号(;),或者在新的一行输入前斜线(/),按回车键即可 SQL> SELECT ename,sal FROM emp
@利菊1716:sql保留两位小数怎么写,在线等!
常峡13420127375…… select Convert(decimal(18,2),100.1231234) 输出结果:100.12 select Convert(decimal(18,2),100) 输出结果:100.00