CAFE

1.SQL 수업

Re: 🟥 오늘의 마지막 문제1 + 이수자 평가 8번 문제

작성자23기 정성태|작성시간26.06.08|조회수14 목록 댓글 0

-- 보기 1 (O) 
create table emp_3879 ( empno3, ename3, sal3, deptno3 )
as
select empno, ename, sal, deptno
    from emp
    where 1 = 2;
    
select * from emp_3879;  


-- 보기 2 (X)
select table_constraints
from emp_3879;

select *
from dictionary
where table_name LIKE '%CONSTRAINTS';

select *
    from USER_CONSTRAINTS
    WHERE table_name = ('emp_3879');
    

-- 보기 3 (O) MYSALES has NOT NULL constraints on any selected columns which had that 
--            constraint in the SALES table 



select *
    from USER_CONSTRAINTS
    WHERE table_name = ('emp_3879');
 
alter table emp modify ( sal not null);
    
    create table emp_3879 ( empno3, ename3, sal3, deptno3 )
as
select empno, ename, sal, deptno
    from emp
    where 1 = 2;
    
select * from emp_3879;  

다음검색
현재 게시글 추가 기능 열기

댓글

댓글 리스트
맨위로

카페 검색

카페 검색어 입력폼