Showing posts with label knows. Show all posts
Showing posts with label knows. Show all posts

Friday, March 23, 2012

literature oracle, mysql, ...

hi
someone knows a good book, in which different data bases are compared like oracle, mysql, ms-sql...
marcushow about a good web site instead?

Comparison of different SQL implementations (http://troels.arvin.dk/db/rdbms/)|||That's a great site...book marked it...

Thanks Rudy!|||thanks,
I am interested not only in sql.

marcus|||Originally posted by mkoster
thanks,
I am interested not only in sql.

marcus

Did you look at the site?

Monday, March 19, 2012

List Tables In A DataBase

hi everybody

If anybody knows how to list the tables in a database in Sql Server Query Analyser .

I would like to know is there any commands or SP 's like sp_help

Thank you for all the support

thanks & regards

Hi,

Simplest way would be to query the sysobjects table:

select name from sysobjects where xtype = 'U'

'U' = User table

Checkout sysobjects in BOL.

Jamie

|||

Another alternative is to use something more like:

SELECT table_name
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA ='dbo'
AND TABLE_TYPE ='BASE TABLE'

The advantage of this is that it does not use the system objects which are subject to change.

|||

Hi, nevincm

Code Snippet

select * from sysobjects where xtype = 'u' /*This will list all tables and its properties*/
select name from sysobjects where xtype = 'u' /*This will list table name as Jamie mentioned*/

Check this code

Monday, March 12, 2012

list Primary and foreign keys

I have a DB with 100 tables. I was wondering if anybody knows a quick way to list primary and foreign key with the column name for all the tables.

Your help would make my life a lot easier

thanks

In 2005 you can simple perform the following query.

SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS

There are a whole bunch of other system views that display similar information.

Larry Pope

Friday, March 9, 2012

List of SQL Server Error Messages

Hi All,
I was wondering if anybody knows where to get a complete list of SQL Server error messages. I am writing a stored procedure that scans SQL Server Logs for errors and if there are errors in the logs, I get paged.
Thanks.Personally, I just look for keywords. Like "error".|||books online has a lot extremely unhelpful descriptions unser Troubleshooting --> Error Messages --> Error Message Descriptions --> System Error Messages.|||there is a table sysmessages in master db|||That's great. But besides the error messages I am also looking for messages in the SQL Server logs such as SQL Server terminating, backup failed, scheduler appears to be hung etc. I found these messages in the SQL Server logs and would like to get a list of all the possible messages that can be found in the logs.