Quick Reminder: List All Tables in a Database

Here's a quick reminder of how to generate a list of tables found in a given database:

SELECT
  TABLE_NAME
FROM
  nmteachv3.INFORMATION_SCHEMA.TABLES
WHERE
  TABLE_TYPE = 'BASE TABLE'
ORDER  BY
  TABLE_NAME 

This query will produce results similar to the following:

TABLE_NAME
AttendanceData
Courses
Districts
Schools
SchoolTypes
StudentCourses
Students
StudentTeacherCourses
TeacherAttendanceData
TeacherCourses
Teachers
Years
YearsDistricts
YearsDistrictsSchools
YearsTeachersSchools


Comments

Popular posts from this blog

Using Reference Aliases

List of Visual Studio Keyboard Shortcuts