MANASH PANDEY
asked on
SHOW ERROR IN SQL
MY QUERY IS
SHOW DATABASES;
THEN SHOW ERROR
Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'SHOW'.
WHY SHOW THIS ERROR PLZ HELP ME.
SHOW DATABASES;
THEN SHOW ERROR
Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'SHOW'.
WHY SHOW THIS ERROR PLZ HELP ME.
"SHOW DATABASES" is for MySQL not SQL server...
SHOW DATABASES Syntax
https://dev.mysql.com/doc/refman/5.7/en/show-databases.html
SHOW DATABASES Syntax
https://dev.mysql.com/doc/refman/5.7/en/show-databases.html
Well there are N number of ways you can get the list of databases. here are few -
1.
2.
3.
If you dont want system databases use below-
4.
if you want to use any specific database use like below
USE [databaseName]
GO
E.g.
USE Master
GO
1.
select * from sys.databases
2.
SELECT * FROM master.dbo.sysdatabases
3.
EXEC sp_databases
If you dont want system databases use below-
4.
SELECT *
FROM sys.databases
WHERE name NOT IN ('master', 'tempdb', 'model', 'msdb');
if you want to use any specific database use like below
USE [databaseName]
GO
E.g.
USE Master
GO
ASKER
thanku ..
Hey Manish , Do you need more help with this
This question needs an answer!
Become an EE member today
7 DAY FREE TRIALMembers can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Try
Open in new window