Tag: query

Network, Python

Make whois queries

PyWhois is a python module for retrieving WHOIS information of domains. Script: #!/usr/bin/python   import sys, whois from optparse import OptionParser   def main(): try: parser = OptionParser() parser.add_option("-d", "–domain", dest="domain", help="domain to query") (options, args) = parser.parse_args()   if options.domain==None: parser.print_help() sys.exit(0)   print ‘looking for ‘ + options.domain + ‘..n’ w = whois.whois(options.domain) …

Microsoft SQL Server, MySQL, Oracle

SQL column name with blank space

Let’s see how we can write queries when a column name contains spaces:   Microsoft Sql Server SELECT [COLUMN Name] FROM TABLE_NAME;SELECT [Column Name] FROM table_name; MySQL SELECT ‘Column Name’ FROM TABLE_NAME;SELECT ‘Column Name’ FROM table_name; Oracle SELECT "Column Name" FROM TABLE_NAME;SELECT "Column Name" FROM table_name;