SQL
hrsweb
这个作者很懒,什么都没留下…
展开
-
Mysql报错:Operand should contain 1 column(s)
错误:Operand should contain 1 column(s)select * from role where id in (select * from users_role where userId = '111'); // 报错了原因:语法错误,where id in 后面只能跟一个字段,select * from查询结果为整张表的字段。修改后:select * from role where id in (select roleId from users_role where u原创 2020-08-19 23:20:11 · 498 阅读 · 0 评论 -
Oracle和MySQL设置主键id为uuid的方式
Oracle设置uuid比较简单,只要用 default SYS_GUID() 修饰字段id就行CREATE TABLE product( id varchar2(32) default SYS_GUID() PRIMARY KEY, productNum VARCHAR2(50) NOT NULL, productName VARCHAR2(50), cityName VARCHAR2(50), DepartureTime timestamp, productPric原创 2020-08-13 13:45:03 · 1407 阅读 · 2 评论 -
MySQL约束、数据库设计、备份与还原-02
约束原创 2019-12-03 21:15:07 · 120 阅读 · 0 评论