Java, 151 128 77 62 56 bytes
#Java, 151 128 77 62 56 bytes
FirstFirst try at code-golfing.
void f(int n){for(char i=0;++i<=n;System.out.print(i));}
Usage:
import java.util.Scanner;
class A {
public static void main(String[] a) {
int num = new Scanner(System.in).nextInt();
new A().f(num);
}
void f(int n) {
for (char i = 0; ++i <= n; System.out.print(i));
}
}
Thanks to @Shujal, @flawr, @Ingo Bürk and @Loovjo for the serious byte reduction.