显示所有轨道的名称以及列长度中以秒表示的长度 [英] Display the name of of all the tracks alongside the length expressed in seconds in the column length

查看:69
本文介绍了显示所有轨道的名称以及列长度中以秒表示的长度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在转换中遇到的问题是1秒= 1000毫秒。因为列名是毫秒。我别名毫秒到长度,但没有得到如何计算出第二个长度



我尝试过:



选择名称,毫秒作为距离轨道的长度=长度=毫秒/ 1000;

im getting problem in the conversion as 1 second = 1000 milliseconds. as the column name is milliseconds. i alias milliseconds to length but are not getting how to figure out that length in second

What I have tried:

select name, milliseconds as length from track where length = milliseconds/1000;

推荐答案

1毫秒= 0.001秒



1 millisecond = 0.001 seconds

select name, milliseconds*1000 As Seconds
from track


我不确定为什么你需要查询中的where条件。如果你想要以秒为单位计算长度,你只需要将毫秒列乘以1000.



选择名称,毫秒* 1000作为轨道长度
I am not sure why you would need where condition in your query. If you want figure out length in seconds you just need to multiply milliseconds column by 1000.

Select name, milliseconds*1000 as length from track


这篇关于显示所有轨道的名称以及列长度中以秒表示的长度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆