先串連到master庫中,執行 select name from master..sysdatabases 就可以了。sp_helpdb也可以列出資料名,但不是全部,sp_helpdb是會根據目前使用者角色找出相應的資料庫,而用sysdatabases表則只要有許可權訪問該表就能查出所有資料庫資訊。預設情況下,sqlserver提供的6個資料庫中,除了model資料庫外,其他若干個資料庫還可能擁有guest使用者。exec
http://msdn.microsoft.com/en-us/library/97af8hh4.aspxGuid.ToString Method (String)The following table shows the accepted format specifiers for the format parameter. "0" represents a digit; hyphens ("-"), braces ("{", "}"), and parentheses ("(", ")")
// 測試案例:// 直角三角形:3 4 5// 鈍角三角形:3 5 7// 銳角三角形:6 6 6#include <stdio.h>#include <stdlib.h>// test if the three number is a triangle int isTriangle(int a, int b, int c) { if ((a > 0) && (b > 0)
1. 數組聲明2. 數組初始化3. 數組取值 1. 數組聲明int[] table; // not int table[]; int[] numbers; // declare numbers as an int array of any size numbers = new int[10]; // numbers is a 10-element array numbers = new int[20]; // now it's a 20-element arraystring[,]
using System;using System.Collections.Generic;using System.Text;namespace SoloDataStructure{ class MyBubbleSort { //冒泡排序 static void BubbleSort(int[] arr) { int n = arr.Length; for (int i = 0; i < n