该函数接受一个正数,并创建一个包含0(包括)和作为参数传递的数字(排除)之间的所有数字的列表。默认是100
(defun list-numbers (&optional (n 100))
(mapcar #'abs (make-list n :initial-element (- n 1))))
Run Code Online (Sandbox Code Playgroud)
如果您想查看结果https://ideone.com/Jbz5u3
(99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 99 …
我试图删除两个相关表中的数据 - 表中的主键和表中的users外键login- 但我收到错误PL/SQL: ORA-00933: SQL command not properly ended.
创建表users和主键:
/* table user*/
create table users (id_user number(10) not null,
name_user varchar(30) not null);
/* primary key */
alter table users add constraint user_pk primary key (id_user);
Run Code Online (Sandbox Code Playgroud)
创建表login和主键以及外键:
/* table login*/
create table login (id_login number(10) not null,
id_user_login number(10) not null,
email_login varchar(20) not null,
password_login varchar(20) not null);
/* primary key */
alter table login add constraint …Run Code Online (Sandbox Code Playgroud)