代码拉取完成,页面将自动刷新
CREATE database Func
use Func
drop table
create table user
(
UID int PRIMARY key auto_increment,
UNameID int UNIQUE,
UName VARCHAR(25) ,
UCode VARCHAR(25) ,
UCost DECIMAL not null,
UCState VARCHAR(25) not null,
Uptime datetime not null,
Uamend datetime not NULL
)
create table depot
(
DID int PRIMARY key auto_increment,
UNameID int UNIQUE,
Dquantity int not null,
FOREIGN key (UNameID) REFERENCES user(UNameID)
)
select ABS(UCost) from user
select CEIL(888.55)
select ceiling(888.22)
select FLOOR(55.22)
select RAND(5)
select ROUND(555.55)
select ROUND(555.34)
SELECT LENGTH('555555')
select CHAR_LENGTH('665222')
select REPLACE('54321',1,0)
SELECT INSERT('987654321',3,2,'2')
SELECT LEFT('987654321',1)
SELECT RIGHT('987654321',1)
select SUBSTRING('987654321',2,3)
select CONCAT('987654321','asd')
select LOWER('ASD')
select UPPER('asd')
select REVERSE('123456789')
SELECT TRIM(' sdf ')
SELECT LTRIM(' sdf ')
SELECT RTRIM(' sdf ')
SELECT REPLACE(' sd f ',' ','')
SELECT NOW()
SELECT FROM_UNIXTIME('10086'),UNIX_TIMESTAMP('2021-09-02 16:44:09')
SELECT IF(UCost>1000,'土豪','土狗') from user
SELECT CASE UCState
WHEN 1 THEN
'在线'
WHEN 2 THEN
'离线'
ELSE
'未知状态'
END
from user
SELECT IFNULL(UCost,'0') from user
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。