access資料庫常用操作

2021-10-01 06:08:10 字數 1131 閱讀 3114

建立資料庫,建立表:建立->表

匯入資料:外部資料->新資料來源, 從檔案,匯入csv資料,高階設定裡可以設定編碼格式

彙總:方差,標準差,計數,最大值最小值平均值——開始->合計

簡單查詢:

1,建立,查詢嚮導

2,建立,查詢設計

基本查詢語句:

#選擇所有資料

select *

from table_name;

#選擇不同的資料

select distinct column_name,column_name

from table_name;

#過濾select column_name,column_name

from table_name

where column_name operator value;

-where country='cn' #單引號環繞文字值

-where id>50 #數值

-where oid is null #查詢空值

-where did between 1500 and 3000

-where oid>50 and did>20

-where oid>50 or did>20

#排序select column_name,column_name

from table_name

order by column_name,column_name asc|desc;

#插入資料

insert into table_name

values (value1,value2,value3,...);

insert into table_name (column1,column2,column3,...)

values (value1,value2,value3,...);

#更新update table_name

set column1=value1,column2=value2,...

where some_column=some_value;

#刪除delete from table_name

where some_column=some_value;

C SQL操作ACCESS資料庫

前幾天寫的 的資料有點不對,就在vc下寫了個程式來刷了一下資料.該程式為doc下的程式,沒有介面的,操作access資料庫,其中,用boost的lexical cast 對型別進行了轉換.期間用vector儲存了資料庫的資料,希望對有需要的人有幫助.第乙個程式用來生成單位編號的,程式如下 inclu...

C 操作Access資料庫

using system using system.collections.generic using system.linq using system.text using system.data using system.data.oledb using system.configuration...

Qt操作Access資料庫

qt為資料庫訪問提供qtsql模組實現了資料庫與qt應用程式的無縫整合。qtsql模組使用驅動外掛程式與不同的資料庫介面通訊。qt自帶有qodbc驅動,通過windows平台上提供的odbc驅動訪問支援odbc的資料庫,如ms access sql server等 windows xp 自帶有acc...