Saturday, September 7, 2013

How to find names of tables from a database in SQL Server

Showing Table names from a Database in SQl Server

In SQL Server "sts.Tables" is gives all the information about the tables which are present in a database.
here is the example for this

use database_name
 select *  from sys.tables

This query results all the information about the table such as name, creation date,modified date,type etc..
Now you can select which column you want from that table..

use database_name
select name from sys.tables

How to know how many tables are there in a Database 

From the above we know about sys.tables.
now we count how many tables are present a Database.
see this example.

use Database_name
Select count(*) form sys.tables

this query results number of tables present in a Database.

How to copy table form one database to another in SQL Server

Copying table from one database to another database in SQL Server 

This is very simple task.

STEP 1: select columns ( * or required columns ) from existing table.
STEP 2: Now insert this result table into new table on another table database.

select  *
into    ToDB.dbo.table2
from    FromDB.dbo.Table1

Thursday, September 5, 2013

Customized startup options for SQL Server Management Studio

Customized startup options for SQL Server Management Studio

SQLWB.exe for Sql Server 2005
SSMS.exe for SQL Server 2008
These two are executable files for launch SQL Server

Start--> All programs -->SQL Server 2005-->SQL Server 2005 Management Studiio

Start--> All programs -->SQL Server 2008-->SQL Server 2008 Management Studiio

see the below images,
how to start SQL Server Management Studio from RUN

This will Launch SQL Server 2005

 This will launch SQL Server 2008

Some customized options:

[S server_name[\instance_name]] [-d database] [-U user] [-P password] [-E][file_name[, file_name]][/?]

Explanation : 
[-S The name of the SQL Server Instance to which to connect ]
[-d The name of the SQL Server database to which to connect ]
[-E Use Windows Authentication to login to SQL Server ]
[-U The Name of the SQL Server login with which to connect ]
[-P The Password associated with the login ]
[file_name [,file_name]] name of files to load
[-nosplash] Supress splash screen
[/?] Displays this usage information

Wednesday, September 4, 2013

List of Agencies of United Nations

UN Agencies:

International Labour Organization (ILO)  Headquarters - Geneva,Switzerland

Universal Postal Union (UPU)  Headquarter -Bern,Switzerland

Food and Agriculture Organization of the United Nations (FAO)
FAO emblem with its Latin motto, Fiat Panis  ("Let there be bread")
Headquarters -Rome, Italy

United Nations Environment Programme (UNEP)  Headquarters - Nairobi

List of Maharatna, Navratna and Miniratna CPSEs released on February 2013

List of Maharatna, Navratna and Miniratna CPSEs released on February 2013

CPES (Central Public Sector Enterprise)

This list based on available information only.

Maharatna CPES

Bharat Heavy Electricals Limited
Coal India Limited
GAIL (India) Limited(Gas Authority of India Limited)
Indian Oil Corporation Limited
NTPC Limited
Oil & Natural Gas Corporation Limited
Steel Authority of India Limited

Navratna CPES

Bharat Electronics Limited
Bharat Petroleum Corporation Limited
Hindustan Aeronautics Limited
Hindustan Petroleum Corporation Limited
Mahanagar Telephone Nigam Limited
National Aluminium Company Limited
NMDC Limited
Neyveli Lignite Corporation Limited
Oil India Limited
Power Finance Corporation Limited
Power Grid Corporation of India Limited
Rashtriya Ispat Nigam Limited
Rural Electrification Corporation Limited
Shipping Corporation of India Limited

Miniratna Category - I CPES

Airports Authority of India
Antrix Corporation Limited
Balmer Lawrie & Co. Limited
Bharat Dynamics Limited
BEML Limited
Bharat Sanchar Nigam Limited
Bridge & Roof Company (India) Limited
Central Warehousing Corporation
Central Coalfields Limited
Chennai Petroleum Corporation Limited
Cochin Shipyard Limited
Container Corporation of India Limited
Dredging Corporation of India Limited
Engineers India Limited
Ennore Port Limited
Garden Reach Shipbuilders & Engineers Limited
Goa Shipyard Limited
Hindustan Copper Limited
HLL Lifecare Limited
Hindustan Newsprint Limited
Hindustan Paper Corporation Limited
Housing & Urban Development Corporation Limited
India Tourism Development Corporation Limited
Indian Railway Catering & Tourism Corporation Limited
IRCON International Limited
KIOCL Limited
Mazagaon Dock Limited
Mahanadi Coalfields Limited
Manganese Ore (India) Limited
Mangalore Refinery & Petrochemical Limited
Mishra Dhatu Nigam Limited
MMTC Limited
MSTC Limited
National Fertilizers Limited
National Seeds Corporation Limited
NHPC Limited
Northern Coalfields Limited
North Eastern Electric Power Corporation Limited
Numaligarh Refinery Limited
ONGC Videsh Limited
Pawan Hans Helicopters Limited
Projects & Development India Limited
Railtel Corporation of India Limited
Rashtriya Chemicals & Fertilizers Limited
RITES Limited
SJVN Limited
Security Printing and Minting Corporation of India Limited
South Eastern Coalfields Limited
State Trading Corporation of India Limited
Telecommunications Consultants India Limited
THDC India Limited
Western Coalfields Limited
WAPCOS Limited

Miniratna Category-II CPES

Bharat Pumps & Compressors Limited
Broadcast Engineering Consultants (I) Limited
Central Mine Planning & Design Institute Limited
Ed.CIL (India) Limited
Engineering Projects (India) Limited
FCI Aravali Gypsum & Minerals India Limited
Ferro Scrap Nigam Limited
HMT (International) Limited
HSCC (India) Limited
India Trade Promotion Organisation
Indian Medicines & Pharmaceuticals Corporation Limited
M E C O N Limited
National Film Development Corporation Limited
National Small Industries Corporation Limited
P E C Limited
Rajasthan Electronics & Instruments Limited


Sukanya Samriddhi Account - SBI