41 0 102KB
SQL COMMANDS SQL Languages: ● DDL: Data Definition Language ○ The DDL provides a set of definitions to specify the storage structure and access methods used by the database system. ● DML: Data Manipulation Language ○ Data Manipulation Language(DML) is a language that enables users to access or manipulate data as organized by the appropriate data model. ● DCL: Data Control Language ○ It is used to control access to the database (by GRANTing / REVOKing etc.) and therefore essential to the system. SQL DATA TYPES: int number varchar2 decimal date char
CREATE
CREATE TABLE employee ( ecode integer ename varchar2(20) sex varchar2(1) grade char (2), gross decimal ) ; create table MOVIE (Movie_no integer, Title varchar2(15), Type varchar2(10), Star varchar2(25), Price number(8,2))
To show
● desc tablename; (oracle only)
structure ALTER
● sp_help tablename (sql server) Alter tablel is to alter structure of table ALTER TABLE