码迷,mamicode.com
首页 > 其他好文 > 详细

Working with Data Sources 7

时间:2016-11-19 09:51:52      阅读:219      评论:0      收藏:0      [点我收藏+]

标签:val   for   null   ada   column   result   where   ber   value   

1.Working with dates in SQL: in SQL query, we can select date by using where. < means before that date, and > means after that date:

  SELECT * FROM facts WHERE updated_at > "2015-10-30 16:00" and updated_at <"2015-11-02 15:00"; 

2. PRAGMA table_info(table_name) return the table info(data type) of each column :

  pragma table_info(facts) #The result will be a list.

3. We can insert a row of data into a table by using INSERT INTO ... values, we can also insert null data into a column if the column is not specific to nonnull type:

  insert into facts values (262, "dq", "DataquestLand", 60000, 40000, 20000, 500000, 100, 50, 10, 20, "2016-02-25 12:00:00", "2016-02-25 12:00:00") # The number data in the value have to match the data of column in the table

4. We can update data in the specific row or column by using UPDATE...SET:

  update facts
  set name = "United"
  where name = "Dataquestland"

5. Delete rows of data by using delete from functoin:

  Delete from facts where name = ‘Canada‘

6.

Working with Data Sources 7

标签:val   for   null   ada   column   result   where   ber   value   

原文地址:http://www.cnblogs.com/kingoscar/p/6079811.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!