준준의 기록일지

[sql쿼리] create, select, alter, insert 본문

Database

[sql쿼리] create, select, alter, insert

junjunwon 2020. 8. 13. 17:30

"이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다."




select * from sample_info

 

create table sampleOtp_info (

otp_id int not null,

otp_user varchar(10) not null

)

--테이블 삭제

drop table [테이블 명]

 

select * from sampleOtp_info

 

alter table sample_info add req_desc varchar(50)

 

 

insert into sample_info  values (4, '안녕하세요. Test 입니다.','컴퓨터 고장으로 인한 신청', '변경사유 없음');

 

 

alter table sample_info add update_desc varchar(50)

 

select * from sample_info

 

- 컬럼 삭제

alter table [vos].[dbo].[temp_junho] drop column modifieddate

'Database' 카테고리의 다른 글

[mssql] update select 동시 작업  (0) 2020.11.02
[mssql] trigger  (0) 2020.10.27
[MSSQL] 테이블 복사 (구조, 데이터)  (0) 2020.10.27
[SQL] INNER JOIN, OUTER JOIN, ON, WHERE  (0) 2020.10.27
[MSSQL] DECLARE, BEGIN-END 문  (0) 2020.10.27