SQL Learning Tip 5

1. The constraints include: NOT NULL, primary key, foreign key, Unqiue2. A check constraint restricts what values you can insert into a column. It uses the same conditional as a where clause.   SQL ...
阅读(570) 评论(0)

SQL Learning Tip 4

1. select some_column from table where column1 = (subquery)   subquery will return a column value in <>   Notice:    a. If a subquery is used as a column expression in a select statement, it can...
阅读(531) 评论(0)

SQL Learning Tip 3

1. DataBase Schema  A representation of all the structures, such as table and columns, in your database, along with how they connect, is known  as Schema2. Foreign key  a column in a table tha...
阅读(518) 评论(0)

SQL Learning Tip2

1. alter table talbe_name add column column_name data_type (First/Before/Last/After/Fifth) (column_name)   Comments: set the new column in a certain position compared with "assigned column"2. alte...
阅读(519) 评论(0)

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. ins...
阅读(484) 评论(0)
    • 访问:1685324次
    • 积分:14177
    • 等级:
    • 排名:第908名
    • 原创:353篇
    • 转载:48篇
    • 译文:0篇
    • 评论:262条