SQL Learning Tip

1.  create database; use database;
2. create table tablename(columnName columnType,...);
3. desc table/drop table tablename;
4. datatype:  int, dec(num,num), varchar(), char, blob, date, datetime.
5. insert into table_name (column1,column2,...) values (value1,value2,...)
6. Null value is not equal with another Null in the column.
7. The varchar, character, datetime, date, blog uses single quotes
8. where clause:  column value is NULL/is not NULL
9. select * from tablename where column like '%keyword%'   *:  any number of unknown character   _:  one character of unknown character
10:  between equals <= and >=;
11. select * from tableName where column in (A,B,....)
12. Not/<>:  not equal
13. select * from nls_session_parameters where parameter = 'NLS_DATE_FORMAT';
14. Lower()/Upper():
15.   1NF:    a. Each row of data must contain atomic values    b. Each row of data must have a unique identifier named "Primary Key"       A primary key is a column in your table, that will make each record unique.        Not null, must have value when inserting,compact, can't be changed.    c. 16. Auto_increment to set value for a column in a table
17. Alter Table with a primary key  Sql:     alter table table_name      add column column_name column_type (not null) (auto_increment) (First),
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值