作者查詢 / TeemingVoid
作者 TeemingVoid 在 PTT [ Database ] 看板的留言(推文), 共239則
限定看板:Database
看板排序:
1F推:很久很久沒使用 Access 了,所以,我有可能是錯的,07/29 21:10
2F→:單就 SQL 語法來說,利用 union 可連接兩個 select :07/29 21:10
3F→:select ID, DataA, null as DataA from TableA07/29 21:11
4F→:union all07/29 21:11
5F→:select ID, null, DataB from TableB07/29 21:11
6F→:select ID, DataA, null as DataB from TableA07/29 21:16
7F推:↑↑↑第一行應該這樣才對!07/29 21:19
1F推:請參考這頁的說明: http://ppt.cc/71LQ07/29 21:15
2F推:RAID 1+0,詳情: http://ppt.cc/7Lnm07/25 01:06
3F推:order by rand 是比較優雅的寫法,如果要比較快的:07/25 01:10
4F→:http://ppt.cc/iCa~07/25 01:11
1F推:1. 將 Excel 文件另存成 .CSV 檔07/02 01:31
2F→:2. 利用 load data infile 指令匯入資料07/02 01:31
3F→: 詳情請見: http://ppt.cc/Ehtb07/02 01:32
4F→:至於 phpMyAdmin 的作法,請參考:http://ppt.cc/udEU07/02 01:33
1F推:select s1.name as StuffName, s2.name as AgentName07/01 22:32
2F→:from staff_agent a07/01 22:33
3F→: join staff s1 on a.staff_id = s1.id07/01 22:33
4F→: join staff s2 on a.agent_id = s2.id07/01 22:33
5F→:order by s1.name07/01 22:34
1F推:請參考: http://troels.arvin.dk/db/rdbms/06/21 20:35
2F推:像這樣子嗎:06/21 02:14
3F→:declare @t table (id int)06/21 02:14
4F→:declare @i int06/21 02:14
5F→:set @i = 106/21 02:15
6F→:while @i <= 306/21 02:15
7F→:begin06/21 02:15
8F→: insert into @t values (@i)06/21 02:15
9F→: set @i = @i + 106/21 02:16
10F→:end06/21 02:16
11F→:select * from @t06/21 02:16
1F推:使用 mysqldump 工具程式可將資料備份成 SQL 指令04/07 19:02
1F推:請參考這篇: http://ppt.cc/eV2@04/04 12:11