About 17,100,000 results
Open links in new tab
  1. sql - Storing sex (gender) in database - Stack Overflow

    Nov 14, 2010 · I want to store a user's gender in a database with as little (size/performance) cost as possible. So far, 3 scenarios come to mind Int - aligned with Enum in code (1 = Male, 2 = …

  2. How to Create a Gender Column in SQL - Intellipaat

    Apr 27, 2025 · Learn how to add a gender column to your SQL database. Follow easy steps to create and populate the gender column for better data management.

  3. SQL Query to Replace a Column Values from ‘male’ to ‘female’ …

    Aug 25, 2022 · In this article, we will Implement a Query to Replace Column Values from ‘male’ to ‘female’ and ‘female’ to ‘male’. For a better explanation, we will Implement this Query with an …

  4. sql server - I am trying to represent the value of gender field with ...

    Oct 28, 2016 · SQL does allow NULLs in a bit field, so that at least gives you a third value, perhaps for "unknown" or "declined to state". Not sure exactly what your DB is for, but you …

  5. sql - How would you add a column that only has a set choice of …

    Oct 7, 2012 · If I wanted to add a column that could only be two values, for example, a column called 'Gender' with the two possible options of 'Male' or 'Female'

  6. MySQL gender table field - Stack Overflow

    Mar 2, 2012 · If I want to create a gender field in my table, how do I make sure that my database doesn't accept any value apart from "M" or "F" ? $sqlCommand = "CREATE TABLE members …

  7. How to separate Gender As MALE AND FEMALE in sql server …

    Sep 21, 2018 · SELECT IIF(Gender IS NULL, 'Others', IIF(Gender = 1, 'Male', 'Female')) Gender FROM Users;

  8. sql server - Change Gender value in SQL table - Stack Overflow

    May 7, 2025 · There is a column to determine whether the Employee is male or female. i.e Male or Female. Now I need to convert all Male to Female and all Female to Male? The table …

  9. SQL Server Gender Swap Query - Stack Overflow

    Jun 11, 2010 · update gender(table name) set gender(column name) = case when gender(columnname)='male' then 'female' else 'male' end; Here my table name and column …

  10. SQL Server - 'Gender' column - Databases - SitePoint

    Nov 17, 2008 · What is the most efficient type for a ‘gender’ column with ‘M’ and ‘F’ options? -Should the ‘gender’ column be an index into a another lookup table? -Should it be a ‘char ...

  11. Some results have been removed